Skip to content

kevinnice123/database-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Simple Report Database Project πŸ‘₯ Contributors

Kwizera Josias (26135)

Niyomugabo Nice Kevin (26708)

Khadija Adam (28041)

πŸ“Œ Project Overview

This project demonstrates the core concepts of relational database design and query optimization. It covers table creation with constraints, joins, indexing, and views to ensure consistency, efficiency, and simplified access to data.

πŸ› οΈ Features

  1. Tables

Students

student_id β†’ Primary Key

name β†’ Not Null

email β†’ Unique & Not Null

OUTOUT

pl 1
  1. Joins

INNER JOIN β†’ Shows students who are enrolled in courses.

LEFT JOIN β†’ Shows all students, even if not enrolled.

RIGHT JOIN β†’ Shows all courses, even if no student is enrolled.

FULL OUTER JOIN (via UNION in MySQL) β†’ Shows all students and all courses.

OUTPUT

PL2
  1. Index

idx_student_email on the email column.

Improves query performance when searching students by email.

OUTPUT

PL3
  1. View

StudentCourseView created for simplified queries:

SELECT * FROM StudentCourseView;

Reduces the need to repeatedly write join queries.

OUTPUT

  1. Results

Clear relationships between students and courses.

Joins highlight different perspectives of combining data.

Index boosts efficiency.

View ensures ease of use.

βœ… Conclusion

This project demonstrates how relational databases:

Maintain data integrity through constraints.

Provide multiple perspectives with joins.

Improve query performance using indexes.

Simplify data access with views.

πŸ“‚ How to Run

Create a MySQL database.

Import the provided SQL scripts for table creation and sample data.

Run the queries to test joins, index, and view.

πŸ”Ž Summary: The project builds a student-course database, applies constraints for integrity, demonstrates joins for data relationships, creates an index for performance, and defines a view for simplified access. It’s a practical introduction to relational database design and optimization.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published