一. ER图
二.表格
三.Sql脚本
USE [丁艳]
GO
/****** Object: Table [dbo].[收银员] Script Date: 11/04/2018 14:55:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[收银员](
[工号] [int] NOT NULL,
[姓名] varchar NULL,
[密码] varchar NULL,
[电话] varchar NULL,
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 14:55:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[商品销售清单](
[流水号] [int] NOT NULL,
[收银员] varchar NOT NULL,
[商品号] varcharNOT NULL,
[销售时间] varchar NULL,
PRIMARY KEY CLUSTERED
(
[流水号] ASC
[收银员] ASC
[商品号] 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 14:55:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[商品](
[商品号] [int] NOT NULL,
[商品] varchar NULL,
[名称] varchar NULL,
[价格] varchar NULL,
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 14:55:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[库管员](
[工号] [int]NOT NULL,
[姓名] varchar NULL,
[密码] varchar NULL,
[电话] varchar NULL,
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 14:55:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[商品录入清单](
[流水号] [int] NOT NULL,
[库管员工号] varcharNOT NULL,
[商品号] varchar NOT NULL,
[录入时间] varcharNULL,
PRIMARY KEY CLUSTERED
(
[流水号] ASC
[库管员工号] ASC
[商品号] 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 14:55:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[供应商](
[代码] [int] NOT NULL,
[名称] varchar NULL,
[地点] varchar NULL,
[联系人] varchar NULL,
[电话] varchar NULL,
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