Skip to content

πŸ—„οΈ A collection of SQL codes, queries, and practice exercises for databases. Covers basics like CRUD operations, joins, constraints, and indexing, along with advanced queries. Designed to strengthen database management skills and problem-solving with real-world data handling.

License

Notifications You must be signed in to change notification settings

H0NEYP0T-466/SQL_CODES

Repository files navigation

SQL_CODES

GitHub License GitHub Stars GitHub Forks Contributions Welcome GitHub Issues

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.

πŸ”— Links

πŸ“‹ Table of Contents

πŸš€ Installation

Prerequisites

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

Steps

  1. Clone the repository

    git clone https://github.com/H0NEYP0T-466/SQL_CODES.git
    cd SQL_CODES
  2. Set up your database environment

    • Install Microsoft SQL Server or use SQL Server Express
    • Open SQL Server Management Studio (SSMS)
  3. Connect to your SQL Server instance

    • Use Windows Authentication or SQL Server Authentication
    • Ensure you have appropriate permissions to create databases
  4. Run the scripts

    • Open any .sql file in SSMS
    • Execute the scripts step by step or all at once

πŸ’» Usage

Basic Database Operations

-- 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'

Lab Activities

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

Example Projects

  1. Hospital Management System (sql project.sql)

    • Complete database schema for healthcare management
    • Includes patients, doctors, nurses, treatments, and billing
  2. Company Database (A1Sql_CompanyDB.sql)

    • Employee management system
    • Department and salary tracking
  3. E-commerce Database (A2_Ecommerence.sql)

    • Customer and product management
    • Order processing system

✨ Features

  • πŸ₯ 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

πŸ“ Project Structure

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

πŸ› οΈ Built With

🀝 Contributing

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.

Quick Start for Contributors

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ—ΊοΈ Roadmap

Current Features βœ…

  • 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

Planned Features πŸš€

  • 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

Future Vision 🌟

  • 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

πŸ™ Acknowledgments

  • 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

Tech Stack & Tools

  • πŸ—„οΈ 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!

About

πŸ—„οΈ A collection of SQL codes, queries, and practice exercises for databases. Covers basics like CRUD operations, joins, constraints, and indexing, along with advanced queries. Designed to strengthen database management skills and problem-solving with real-world data handling.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages