Skip to content

A collection of MySQL database exercises demonstrating the creation of tables, foreign key relationships, and SQL queries for data manipulation in academic and organizational contexts.

Notifications You must be signed in to change notification settings

gabycancello/SQL_Database_Design_and_Queries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Database Management and SQL Exercises

This repository contains a collection of SQL exercises focused on database design, data manipulation, and advanced querying techniques. The exercises simulate real-world use cases, such as university and college systems, to demonstrate SQL operations such as database creation, table structures, and querying for specific data insights.

Repository Overview

The repository is organized into multiple folders, each containing exercises related to different aspects of MySQL database management. The exercises cover topics from creating and structuring databases to complex queries involving data filtering, aggregation, and relational integrity.

Folder Breakdown

  1. Activity 1: University Database
    Focuses on simulating a university database for managing *students, **courses, **professors, **classes, and *student grades.

    Examples of exercises:
    • Query to find students with grades below 5 in a specific course.
    • Calculate the average grades of students in a particular course.
    • Retrieve a list of students who are not from the same city.

  2. Activity 2: College Database
    This section demonstrates a college management system that handles *student data, **professor details, **class schedules, and *department information.

    Exercises include:
    • Data insertion and table creation for college-related entities.
    • Altering table structures to match changing requirements (e.g., increasing field sizes).

How to Use

  1. Clone the Repository
    To begin using the repository, clone it to your local machine using your preferred Git client. This can be done with the following command:

    git clone https://github.com/your-username/repository-name.git
    
  2. Import Database Scripts After cloning the repository, import the SQL scripts contained in the relevant folder into your MySQL database. This will create the necessary tables and insert sample data for you to work with.

  3. Querying the Data Once the data is set up, you can start running SQL queries to interact with it. For example, you might want to execute queries to retrive students who have a grade below 5 in a particular course, calculate the average grades of students in a given course, or find students who are from cities outside of your main location.

  4. Learning Outcomes By working through these exercises, you will:

    • Gain hands-on experience in designing relational databases;
    • Practice writing SQL queries to manipulate and extract data;
    • Explore different scenarious sch as data aggregation, foreign key relationships, and database integrity.

Technologies Used

• MySQL Database

• SQL - Structured Query Language

• Relational Database Management Systems - RDBMS

Contributions

Feel free to contribute by opening pull requests or submitting issues related to database structures, queries, or additional exercises.

License

This project is licensed under the MIT License.

About

A collection of MySQL database exercises demonstrating the creation of tables, foreign key relationships, and SQL queries for data manipulation in academic and organizational contexts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published