mirror of
https://github.com/dalers/mywind.git
synced 2025-12-08 14:58:49 +00:00
4fd8765d22602e229e03c481a20fde4d2f73194e
northwind
MySQL equivalent of MS Northwind database (MS Access 2010)
The Northwind demo database provided with Microsoft Access is an excellent tutorial schema for managing small business customers, orders, inventory, purchasing, suppliers, shipping, and employees. My problem was that I wanted to experiment with it using MySQL and the Yii Framework.
Files
- Model: northwind.mwb (MySQL Workbench v6.02)
- ERD: northwind-erd.pdf
- Structure 1: northwind-structure.sql
- Structure 2: northwind-structure-timestamp.sql (record create and modified columns use DEFAULT CURRENT_TIMESTAMP, requires MySQL 5.6.5+)
- Data: northwind-data.sql
Conversion Procedure
- Created Northwind.aacdb using MS Access 2010 (MS Access 2010 > File > New > Sample Templates > Northwind > SaveAs)
- Converted Northwind.accdb to MySQL SQL using BullZip Access to MySQL (version 5.1.242). BullZip states Access to MySQL is "FREEWARE may be used free of charge for non-commercial purposes." (unfortunately it does not convert foreign key relationships though).
- Converted CamelCase identifiers to lower_case_with_underscore
- Replaced space and slash characters in identifiers with underscores
- Renamed primary key columns "id"
- Renamed foreign key columns "xxx_id" (e.g. "inventory_id")
- Changed record create and modified date columns to type DATETIME to avoid TIMESTAMP range (1997 - 2038 UTC) and other limitations
- Added foreign key relationships and created ERD using MySQL Workbench
Languages
SQL
100%