Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 SQL Sample Database

Welcome to the SQL Sample Database repository! This project provides a comprehensive example of a relational database structure, ideal for learning and practicing SQL queries, database normalization, data analysis, and more.

📁 Repository Structure

This repository includes:

  • SQL Scripts for creating and populating the database.
  • Entity-Relationship Diagram (ERD) for understanding the schema.
  • Sample Queries to demonstrate common SQL operations.

🗃️ Database Overview

The sample database simulates a retail management system with the following key entities:

  • Customers
  • Employees
  • Offices
  • Orders
  • OrderDetails
  • Products
  • ProductLines
  • Payments

ERD Preview

An ERD is included in the repository for better understanding of the relationships between tables.

🔧 Getting Started

To set up the database locally:

  1. Clone the repository:

    git clone https://github.com/Spamziesagcan/SQL-Sample-Database.git
    cd SQL-Sample-Database
  2. Use any SQL-compatible database (e.g., MySQL, PostgreSQL, SQLite) to execute the SQL script:

  3. Open your SQL tool of choice.

  4. Execute sample_database.sql to create and populate the database.

  5. Start querying! Sample queries are included in the sample_queries.sql file.

💡 Use Cases This sample database is perfect for:

Practicing SQL queries

Learning relational database design

Teaching database concepts

Testing BI tools and reporting dashboards

✅ Requirements Any SQL-compatible database system (MySQL recommended)

SQL client (like MySQL Workbench, DBeaver, DataGrip, etc.)

🙌 Contributing Contributions are welcome! If you’d like to add new queries, improve documentation, or enhance the schema:

  1. Fork the repository

  2. Create your branch (git checkout -b feature-name)

  3. Commit your changes (git commit -m 'Add new feature')

  4. Push to the branch (git push origin feature-name)

  5. Open a Pull Request

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors