Officially provided by Microsoft-Northwind (e-commerce)-Database Design

Source: Internet
Author: User
Ylbtech-DatabaseDesgin: Microsoft officially provides-Northwind (e-commerce)-Database Design 1.a, database relationship. b. Database Design script (the remarks for this script are described below according to some materials. If any errors are caused, I hope to correct them. Thank you .) ViewCode --

Ylbtech-DatabaseDesgin: Microsoft officially provides-Northwind (e-commerce)-Database Design 1.a, database relationship diagram 1. B, and database design script (the annotation of this script is described below according to some materials, if anything is inappropriate, I hope to correct it. Thank you .) View Code -- =================================================== ==========

Ylbtech-DatabaseDesgin: officially provided by Microsoft-Northwind (e-commerce)-Database Design

1. A. Database Relationship Diagram

1. B. Hong Kong virtual hosts and database design scripts (the comments for this script are described below according to some materials. If any errors are caused, I hope to correct them. Thank you .)

View Code

-- ===================================================== ====== -- Ylb: e-commerce template -- author: YUANBO -- development time: 2011-11-9 -- thank you: liugaiz.pdf -- ============================================= ======= USE master (SELECT nameFROM sys. databases) drop database EShop GO use EShop -- 1, supplier -- Suppliers (SupplierID, -- supplier ID [PK] CompanyName ContactName nvarchar (30), -- contact name ContactTitle (60 ), -- Address: City nvarchar (15), -- City Region nvarchar (15), -- Region PostalCode nvarchar (15), -- zip code Country nvarchar (24 ), -- Country Phone nvarchar (24), -- Phone Fax nvarchar (24), -- Fax HomePage) -- 2, category -- Categories (CategoryID, -- category ID [PK] CategoryName, -- Description Picture) -- 3, product -- Products (ProductID, -- product ID "PK" ProductName SupplierID Suppliers (SupplierID), -- supplier ID CategoryID Categories (CategoryID ), -- category ID QuantityPerUnit nvarchar (20), -- unit quantity UnitPrice money, -- unit price UnitsInStock), -- inventory UnitsOnOrder), -- order quantity ReorderLevel), -- order quantity Discontinued -- 4, order details -- OrderDetails (OrderID ProductID int, -- product ID UnitPrice, -- unit price Quantity, -- Quantity Discount, (OrderID, ProductID) -- Union primary key) -- 5, employee -- P: 1, reportsTo; 2, baseID -- Employees (EmployeeID, -- employee ID [PK] lastName FirstName Title nvarchar (30), -- Title TitleOfCourtesy nvarchar (25), -- Title: BirthDate datetime, -- HireDate (50), -- Address: City nvarchar (15), -- City Region nvarchar (15), -- Region PostalCode nvarchar (10 ), -- zip code Country nvarchar (15), -- National HomePhone nvarchar (24), -- family phone Extension nvarchar (4), -- Extension Photo image, -- Photo Notes ntext, -- note -- ReportsTo int FK PhotoPath nvarchar (255) -- image address -- baseID -- Superior Number) -- 6, customer -- MERs (CustomerID CompanyName ContactName nvarchar (30 ), -- contact name ContactTitle (60), -- Address City nvarchar (15), -- City Region nvarchar (15), -- Region PostalCode nvarchar (15 ), -- Postal code Country nvarchar (24), -- National Phone nvarchar (24), -- Telephone Fax nvarchar (24) -- Fax) -- 7, customer demo image -- CustomerDemoGraphics (CustomerTypeID CustomerDesc) -- 7. Customer demo image -- CustomerCustomerDemo (CustomerID MERs (CustomerID), -- customer ID [PK, FK] mermertypeid CustomerDemoGraphics (mermertypeid), (CustomerID, CustomerTypeID) -- 7, order -- Orders (OrderID, -- order ID [PK] CustomerID MERs (CustomerID), -- customer ID [FP] EmployeeID Employees (EmployeeID), -- employee ID [FP] OrderDate datetime, -- Date of order: RequiredDate datetime, -- date of arrival: ShippedDate datetime, -- date of delivery -- ShipVia int FK -- shipping seller: Fright money, -- shipping fee: ShipName nvarchar (15 ), -- Goods Master name ShipAddress nvarchar (60), -- Goods Master Address ShipCity nvarchar (15), -- Goods master city ShipRegion nvarchar (15), -- Goods master region ShipPostalCode nvarchar (10 ), -- ShipContry nvarchar (15) -- Country of the cargo owner) -- ===================================================== ====== -- 8, shippers (ShipperID, -- shipping ID [PK] CompanyName Phone nvarchar (24) -- telephone)

1. C. function implementation code

No operation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.