Skip to content

Latest commit

 

History

History
43 lines (38 loc) · 1.82 KB

README.md

File metadata and controls

43 lines (38 loc) · 1.82 KB

Microsoft NorthWind modified

Below are links for a modified version of Microsoft NorthWind database with

  • Better primary keys
  • Entities split up e.g. country string to country identifier
  • No spaces in table names

Create a populate

Use the following link for the script to create the database and populate tables best done in SSMS (SQL-Server Management Studio).

Sample SELECT statements

SELECT Cust.CustomerIdentifier, 
       Cust.CompanyName, 
       Cust.ContactId, 
       CT.ContactTitle, 
       C.FirstName, 
       C.LastName, 
       Cust.Street, 
       Cust.City, 
       Cust.Region, 
       Cust.PostalCode, 
       Countries.[Name] AS CountryName, 
       Cust.CountryIdentifier, 
       Cust.Phone, 
       Cust.Fax, 
       Cust.ContactTypeIdentifier, 
       Cust.ModifiedDate
FROM Customers AS Cust
     INNER JOIN Contacts AS C ON Cust.ContactId = C.ContactId
     INNER JOIN ContactType AS CT ON Cust.ContactTypeIdentifier = CT.ContactTypeIdentifier
     INNER JOIN Countries ON Cust.CountryIdentifier = Countries.CountryIdentifier;

Advance evolving version

The following repository is a work in progress using Microsoft Entity Framework Core 3x

Microsoft NorthWind database 2020 Part 1