A comprehensive collection of SQL scripts, database projects, and learning exercises covering essential database concepts, advanced queries, and real-world applications. Perfect for students, developers, and database enthusiasts looking to master SQL and database management systems.
- π Installation
- π» Usage
- β¨ Features
- π Project Structure
- π οΈ Built With
- π€ Contributing
- π License
- πΊοΈ Roadmap
- π Acknowledgments
Before running these SQL scripts, ensure you have one of the following database management systems installed:
- Microsoft SQL Server (Recommended)
- SQL Server Management Studio (SSMS)
- Azure Data Studio
- Visual Studio Code with SQL Server extension
-
Clone the repository
git clone https://github.com/H0NEYP0T-466/SQL_CODES.git cd SQL_CODES
-
Set up your database environment
- Install Microsoft SQL Server or use SQL Server Express
- Open SQL Server Management Studio (SSMS)
-
Connect to your SQL Server instance
- Use Windows Authentication or SQL Server Authentication
- Ensure you have appropriate permissions to create databases
-
Run the scripts
- Open any
.sql
file in SSMS - Execute the scripts step by step or all at once
- Open any
-- Create a new database
CREATE DATABASE YourDatabaseName;
USE YourDatabaseName;
-- Run any script from the repository
-- Example: Hospital Management System
-- Open and execute 'sql project.sql'
The repository contains numbered lab activities that should be completed in sequence:
-- Start with lab_activity#1.sql for basic concepts
-- Progress through lab_activity#2.sql to lab_activity#8.sql
-- Each lab builds upon previous concepts
-
Hospital Management System (
sql project.sql
)- Complete database schema for healthcare management
- Includes patients, doctors, nurses, treatments, and billing
-
Company Database (
A1Sql_CompanyDB.sql
)- Employee management system
- Department and salary tracking
-
E-commerce Database (
A2_Ecommerence.sql
)- Customer and product management
- Order processing system
- π₯ Hospital Management System - Complete healthcare database with patient records, staff management, and billing
- π’ Company Database Examples - Employee management and departmental structures
- π E-commerce Solutions - Customer, product, and order management systems
- π Progressive Lab Activities - Step-by-step learning exercises from basic to advanced SQL
- π§ Database Constraints - Examples of primary keys, foreign keys, check constraints, and unique constraints
- π Transactions & Functions - Advanced SQL features including stored procedures and user-defined functions
- π Data Manipulation - Comprehensive CRUD operations and complex queries
- π― Real-world Scenarios - Practical database design patterns and best practices
SQL_CODES/
βββ π README.md # Project documentation
βββ π LICENSE # MIT License
βββ π CONTRIBUTING.md # Contribution guidelines
βββ π₯ sql project.sql # Hospital Management System (Main Project)
βββ π’ A1Sql_CompanyDB.sql # Company Database Example
βββ π A2_Ecommerence.sql # E-commerce Database Example
βββ π§ Constraints.sql # Database Constraints Examples
βββ ποΈ Create&DeleteDB.sql # Database Creation & Deletion
βββ π SQL_DDL_Commands.sql # Data Definition Language Examples
βββ π lab_activity#1.sql # Basic SQL Operations
βββ π lab_activity#2.sql # Intermediate Queries
βββ π lab_activity#3.sql # Advanced Joins
βββ π lab_activity#4.sql # Subqueries & Views
βββ π lab_activity#5.sql # Transactions & Error Handling
βββ π lab_activity#6.sql # Stored Procedures
βββ π lab_activity#8.sql # Functions & Advanced Features
- Microsoft SQL Server - Primary database management system
- T-SQL - Transact-SQL language for advanced features
- SQL Server Management Studio - Database administration tool
- Azure Data Studio - Cross-platform database tool
- SQL - Standard Query Language for database operations
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Hospital Management System with complete schema
- Progressive lab activities covering SQL fundamentals
- Real-world database examples (Company, E-commerce)
- Advanced SQL features (Functions, Procedures, Transactions)
- Database constraints and relationships
- NoSQL Database Examples - MongoDB and other NoSQL implementations
- Performance Optimization - Query optimization techniques and indexing strategies
- Data Warehousing - OLAP and dimensional modeling examples
- Integration Examples - API integration and data migration scripts
- Security Features - User management, roles, and permissions
- Backup & Recovery - Database maintenance and disaster recovery scripts
- Interactive Tutorials - Web-based SQL learning platform
- Video Content - Comprehensive video explanations for each lab
- Practice Problems - Additional exercises with solutions
- Certification Prep - Materials for SQL certification exams
- Multi-DBMS Support - Examples for PostgreSQL, MySQL, Oracle
- Microsoft for providing excellent SQL Server documentation and tools
- Stack Overflow Community for continuous learning and problem-solving
- SQL learning community for inspiration and best practices
- Database design experts whose patterns and practices are demonstrated here
- Open source contributors who make knowledge sharing possible
- ποΈ Database Systems: SQL Server, T-SQL
- π οΈ Development Tools: SQL Server Management Studio, Azure Data Studio
- π Data Modeling: Relational database design principles
- π Version Control: Git, GitHub
- π Documentation: Markdown, GitHub Pages
Made with β€οΈ by H0NEYP0T-466
β Star this repository if you found it helpful!