Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mahmoudasem337/classicmodels
This repository contains SQL queries and solutions designed to practice, with the "Classic Models" database. It includes a variety of exercises that cover different aspects of SQL. Whether you're a beginner or looking to refine your SQL knowledge, this collection provides practical challenges.
https://github.com/mahmoudasem337/classicmodels
database mysql-database sql
Last synced: 19 days ago
JSON representation
This repository contains SQL queries and solutions designed to practice, with the "Classic Models" database. It includes a variety of exercises that cover different aspects of SQL. Whether you're a beginner or looking to refine your SQL knowledge, this collection provides practical challenges.
- Host: GitHub
- URL: https://github.com/mahmoudasem337/classicmodels
- Owner: mahmoudasem337
- Created: 2024-10-19T13:30:20.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-10-24T22:32:34.000Z (26 days ago)
- Last Synced: 2024-10-26T10:40:14.169Z (24 days ago)
- Topics: database, mysql-database, sql
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# classicmodels
## Overview
This repository contains a collection of SQL queries for practicing and learning SQL using the famous "classicmodels" sample database.
The classicmodels database is a fictional database often used for demonstrating SQL queries, relational database concepts, and more.
It contains data related to a company's customers, orders, products, and employees.## Database Schema
The classicmodels database includes the following tables:Customers – information about customers.
Employees – information about employees, including their office location.
Offices – details about office locations.
Orders – customer orders with status and order date.
OrderDetails – detailed information about each order's products.
Payments – customer payment transactions.
ProductLines – categories of products.
Products – specific products with their details.
## ER Diagram
![Alt text](https://www.mysqltutorial.org/wp-content/uploads/2023/10/mysql-sample-database.png)## Setup
### Step 1: Install MySQL
To get started, you'll need MySQL installed on your local machine.[Download and install MySQL](https://dev.mysql.com/downloads/mysql/) from the official MySQL website.
### Step 2: Download the classicmodels Database
You can download the classicmodels database script from the MySQL sample database repository:[Download classicmodels database](https://www.mysqltutorial.org/wp-content/uploads/2023/10/mysqlsampledatabase.zip)
### Step 3: Import the Database
1- Open MySQL Workbench or any MySQL client of your choice.2- Create a new schema (database) named classicmodels.
3- Run the provided classicmodels.sql script to populate the database.
```
CREATE DATABASE classicmodels;
USE classicmodels;
SOURCE /path/to/classicmodels.sql;
```
### Step 4: Test the Setup
Run a simple query to test the database setup:```
SELECT * FROM customers LIMIT 10;
```