微软官方提供-Northwind(电子商务)-数据库设计
Jun 07, 2016 pm 05:43 PMylbtech-DatabaseDesgin:微软官方提供-Northwind(电子商务)-数据库设计 1.A,数据库关系图 1.B,数据库设计脚本(此脚本的注释,是在下根据一些资料所注,如有不妥当之处,望给予矫正,谨谢。) View Code -- =============================================
ylbtech-DatabaseDesgin:微软官方提供-Northwind(电子商务)-数据库设计
1.A,数据库关系图
1.B,香港虚拟主机,数据库设计脚本(此脚本的注释,是在下根据一些资料所注,如有不妥当之处,望给予矫正,谨谢。)
View Code
-- ============================================= -- ylb:电子商务模板 -- author:YUANBO -- development time:2011-11-9 -- thank you:LiuGaiZhen -- ============================================= USE master ( SELECT name FROM sys.databases ) DROP DATABASE EShop EShop GO use EShop -- 1,供应商 -- Suppliers ( SupplierID , --供应商ID [PK] CompanyName ContactName nvarchar(30), --联系人姓名 ContactTitle (60), --地址 City nvarchar(15), --城市 Region nvarchar(15), --地区 PostalCode nvarchar(15), --邮政编码 Country nvarchar(24), --国家 Phone nvarchar(24), --电话 Fax nvarchar(24), --传真 HomePage ) -- 2,类别 -- Categories ( CategoryID , --类别ID [PK] CategoryName , --说明 Picture ) --3,产品 -- Products ( ProductID , --产品ID『PK』 ProductName SupplierID Suppliers(SupplierID), --供应商ID CategoryID Categories(CategoryID), --类别ID QuantityPerUnit nvarchar(20), --单位数量 UnitPrice money, --单价 UnitsInStock ), --库存量 UnitsOnOrder ), --订购量 ReorderLevel ), --再订购量 Discontinued ) -- 4,订单明细 -- OrderDetails ( OrderID ProductID int, --产品ID UnitPrice , --单价 Quantity , --数量 Discount , (OrderID,ProductID) --联合主键 ) -- 5,雇员 -- P:1,ReportsTo; 2,baseID -- Employees ( EmployeeID , --雇员ID【PK】 lastName FirstName Title nvarchar(30), --头衔 TitleOfCourtesy nvarchar(25), --尊称 BirthDate datetime, --出生日期 HireDate (50), --地址 City nvarchar(15), --城市 Region nvarchar(15), --地区 PostalCode nvarchar(10), --邮政编码 Country nvarchar(15), --国家 HomePhone nvarchar(24), --家庭电话 Extension nvarchar(4), --分机 Photo image, --照片 Notes ntext, --备注 --ReportsTo int FK PhotoPath nvarchar(255) --图片地址 --baseID --上级编号 ) -- 6,客户 -- Customers ( CustomerID CompanyName ContactName nvarchar(30), --联系人姓名 ContactTitle (60), --地址 City nvarchar(15), --城市 Region nvarchar(15), --地区 PostalCode nvarchar(15),--邮政编号 Country nvarchar(24), --国家 Phone nvarchar(24), --电话 Fax nvarchar(24) --传真 ) -- 7,客户演示图形 -- CustomerDemoGraphics ( CustomerTypeID CustomerDesc ) -- 7,客户演示图形 -- CustomerCustomerDemo ( CustomerID Customers(CustomerID), --客户ID【PK,FK】 CustomerTypeID CustomerDemoGraphics(CustomerTypeID), (CustomerID,CustomerTypeID) ) -- 7,订单 -- Orders ( OrderID , --订单ID【PK】 CustomerID Customers(CustomerID), --客户ID【FP】 EmployeeID Employees(EmployeeID), --雇员ID【FP】 OrderDate datetime, --订购日期 RequiredDate datetime, --到货日期 ShippedDate datetime, --发货日期 --ShipVia int FK --运货商 Fright money, --运货费 ShipName nvarchar(15), --货主名称 ShipAddress nvarchar(60), --货主地址 ShipCity nvarchar(15), --货主城市 ShipRegion nvarchar(15), --货主地区 ShipPostalCode nvarchar(10),--货主邮政编码 ShipContry nvarchar(15) --货主国家 ) -- ============================================= -- 8,运货商 -- Shippers ( ShipperID , --运货商ID【PK】 CompanyName Phone nvarchar(24) --电话 )
1.C,功能实现代码
无操作

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Microsoft's full-screen pop-up urges Windows 10 users to hurry up and upgrade to Windows 11

Microsoft releases Win11 August cumulative update: improving security, optimizing lock screen, etc.

Microsoft plans to phase out NTLM in Windows 11 in the second half of 2024 and fully shift to Kerberos authentication

Samsung will provide displays for Microsoft's MR headsets, and the devices are expected to be lighter and have clearer displays

Microsoft launches new Windows 11 AI PC: equipped with innovative 'review' function

Detailed tutorial on establishing a database connection using MySQLi in PHP

Microsoft releases Android beta version of Microsoft Designer: AI technology helps personalized design

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos
