2018.11.4

1.ER图


2.ER图转表格


USE [lj]

GO

/****** Object:  Table [dbo].[收银员]    Script Date: 11/04/2018 18:52:57 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_PADDING ON

GO

CREATE TABLE [dbo].[收银员](

[工号] [int] NOT NULL,

[姓名] [varchar](20) NULL,

[密码] [varchar](20) NULL,

[电话] [varchar](20) NULL,

CONSTRAINT [PK_收银员] PRIMARY KEY CLUSTERED

(

[工号] ASC

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

) ON [PRIMARY]

GO

SET ANSI_PADDING OFF

GO

/****** Object:  Table [dbo].[商品]    Script Date: 11/04/2018 18:52:57 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_PADDING ON

GO

CREATE TABLE [dbo].[商品](

[商品号] [varchar](20) NOT NULL,

[商品名称] [varchar](20) NULL,

[价格] [int] NULL,

CONSTRAINT [PK_商品表] PRIMARY KEY CLUSTERED

(

[商品号] ASC

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

) ON [PRIMARY]

GO

SET ANSI_PADDING OFF

GO

/****** Object:  Table [dbo].[库管员]    Script Date: 11/04/2018 18:52:57 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_PADDING ON

GO

CREATE TABLE [dbo].[库管员](

[工号] [int] NOT NULL,

[姓名] [varchar](20) NULL,

[密码] [varchar](20) NULL,

[电话] [varchar](20) NULL,

CONSTRAINT [PK_库管员] PRIMARY KEY CLUSTERED

(

[工号] ASC

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

) ON [PRIMARY]

GO

SET ANSI_PADDING OFF

GO

/****** Object:  Table [dbo].[供货商]    Script Date: 11/04/2018 18:52:57 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_PADDING ON

GO

CREATE TABLE [dbo].[供货商](

[代码] [int] NOT NULL,

[名称] [varchar](20) NULL,

[地点] [varchar](20) NULL,

[联系人] [varchar](20) NULL,

[电话] [varchar](20) NULL,

CONSTRAINT [PK_供货商] PRIMARY KEY CLUSTERED

(

[代码] ASC

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

) ON [PRIMARY]

GO

SET ANSI_PADDING OFF

GO

你可能感兴趣的:(2018.11.4)