Skip to content

ortigasjohnrey/Understanding_SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗄️ Database Design and Case Studies

Author: JOHN REY ORTIGAS
Course: BSCS 3B

This repository contains multiple database case studies I designed and analyzed as part of my coursework.
Each case focuses on data modeling, entity relationships, and business logic implementation using SQL-based database systems.


📚 Table of Contents

  1. Case Study 1 — Student Enrollment Database
  2. Case Study 2 — Student Enrollment ERD and Queries
  3. Case Study 3 — Art Gallery Management System
  4. Case Study 4 — Student Record Query System
  5. Case Study 5 — Bakeshop Inventory and Sales Management

🧩 Case Study 1 — Student Enrollment Database

Author: JOHN REY ORTIGAS — BSCS 3B

🎯 Business Task

This database is designed to manage student enrollment and academic records efficiently.

🧠 Main Features

  • Store student details (ID, first name, last name)
  • Maintain staff information (ID, name, birthdate)
  • Manage class offerings (class code, name, units)
  • Track student enrollments:
    • Which student enrolled in which class
    • Which staff teaches each class
    • Grades received by students
  • Enable queries to:
    • Filter by grade
    • Search students by name
    • List students with their classes and grades
    • Order grades in ascending or descending order

🧩 Case Study 2 — Student Enrollment ERD and Queries

Business Task:
This case expands on the enrollment database by including Entity Relationship Diagram (ERD) design and analytical SQL queries.

🧠 Main Features

  • Maintain student information (ID, first name, last name)
  • Store staff details (ID, name, birthdate)
  • Manage subject offerings (class code, name, units)
  • Track enrollments:
    • Students enrolled per class
    • Assigned staff per class
    • Grades per student
  • Provide analytical queries:
    • Count available subjects
    • Retrieve highest and lowest grades
    • Compute GPA and total grades per student

🧩 Case Study 3 — Art Gallery Management System

🎯 Business Task

This database manages art gallery operations, tracking artists, artworks, customers, and purchase transactions.

🧠 Main Features

  • Maintain artist records (ID, name)
  • Store artwork details (art number, title, artist)
  • Manage customer records (ID, first name, last name)
  • Track purchases:
    • Which customer bought which artwork
    • Purchased artwork and artist details
    • Purchase date and customer purchase count
  • Provide analytical queries:
    • Count customers buying specific artworks
    • Retrieve customer purchase history
    • Display purchases with artwork and artist details
    • Generate reports on total and frequent buyers

🧩 Case Study 4 — Student Record Query System

🎯 Business Task

This case study focuses on data querying and reporting for student academic performance.

🧠 Main Features

  • Maintain student information (ID, first name, last name)
  • Store staff and class details (name, birthdate, code, units)
  • Track student enrollments and grades
  • Provide analytical queries to:
    • List students by specific grades
    • Find student details by last name
    • Retrieve students enrolled in a given class
    • Display grades per class and per student

🧩 Case Study 5 — Bakeshop Inventory and Sales Management

Author: JOHN REY ORTIGAS — BSCS 3B

🎯 Business Task

This database manages bakeshop operations, covering inventory, sales, suppliers, and financial records.

🧠 Main Features

  • Maintain branch information (ID, name, address)
  • Manage product categories (cakes, bread, beverages, etc.)
  • Track suppliers and supplied products
  • Monitor product details: stock, price, cost, and expiration
  • Store customer data and purchase orders
  • Record employee roles and assignments
  • Handle invoices, payments, and order details
  • Generate business reports:
    • Total sales and revenue
    • Profit margins
    • Sales by product category or supplier
    • Low-stock and expiration alerts
    • Employee performance tracking
    • Customer purchase patterns

🧾 Summary

Each case study demonstrates:

  • Database planning and modeling
  • Entity-Relationship Diagram (ERD) design
  • Structured query formulation
  • Real-world business logic translation into database systems

These projects collectively highlight practical database management skills applicable to business, education, and retail systems.


👨‍💻 Author

John Rey Ortigas
BS Computer Science Student

About

In this repository, I will integrate what I have learned about the SQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published