SQL 50 Database Schemas
This directory contains sample database schemas and data for practicing SQL 50 problems.
Available Schemas
1. E-commerce Schema (ecommerce.sql
)
Complete e-commerce database with:
- Users, Products, Orders tables
- Customer behavior tracking
- Sales analytics data
2. Social Network Schema (social_network.sql
)
Social media platform database with:
- Users, Friends, Posts tables
- Friendship relationships
- Activity tracking
3. Employee Management Schema (hr_system.sql
)
HR management system with:
- Employees, Departments, Salaries tables
- Organizational hierarchy
- Performance tracking
4. Movie Rating Schema (movie_system.sql
)
Movie rating platform with:
- Movies, Users, Ratings tables
- Genre classifications
- Temporal rating data
How to Use
- Choose the appropriate schema for your practice
- Load the SQL file into your database system
- Practice SQL 50 problems using the provided data
- Modify data as needed for additional practice scenarios
Database Compatibility
All schemas are designed to work with:
- MySQL 8.0+
- PostgreSQL 12+
- SQL Server 2019+
- SQLite 3.25+
Platform-specific notes are included in each schema file.