This project demonstrates the process of designing and creating a relational database for analysing chocolate sales data using MySQL. It focuses on database design, table creation, data organisation, and exploratory SQL analysis.
The database was built from a sales dataset and organised into a relational schema consisting of dimension tables and a fact table to support efficient data analysis.
- Design and create a relational SQL database from a raw sales dataset
- Create tables with appropriate data types and relationships
- Implement primary and foreign keys to maintain data integrity
- Import data from CSV files
- Explore the dataset using SQL queries
- Build a foundation for business-focused sales analysis
The database consists of five related tables:
- Products β product details, including brand, category, cocoa percentage and weight
- Customers β customer demographics and loyalty membership
- Stores β store information and location
- Calendar β date attributes for time-based analysis
- Sales β transactional data including orders, products, customers, stores, quantities, revenue, costs and profit
Relationships between the tables are enforced using primary keys and foreign keys to ensure data consistency.
The following stages have been completed:
- β Created the database
- β Designed and created relational tables
- β Defined primary and foreign keys
- β Imported data from CSV files
- β Performed initial data exploration using SQL queries
- β Generated a database schema
π§ Work in Progress
This project is actively being developed. Future updates will include more advanced SQL analysis and business insights.
- Sales trend analysis
- Product performance analysis
- Customer purchasing behaviour analysis
- Store performance analysis
- Profitability analysis
- Business insights and recommendations
- MySQL
- MySQL Workbench
- SQL
- Git & GitHub
The project uses a chocolate sales dataset containing information about products, customers, stores and sales transactions.
