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
Use the following link for the script to create the database and populate tables best done in SSMS (SQL-Server Management Studio).
- Customers
- Employees
- Products by category
- Order by order identifier
- Order details by order identifier
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;
The following repository is a work in progress using Microsoft Entity Framework Core 3x