0% found this document useful (0 votes)
2 views21 pages

Database Project

The document outlines the design and implementation of a University Course Management System database using Oracle Database, focusing on managing students, professors, courses, and enrollments. It details the relational model, including six tables, SQL DDL for schema creation, data population, relational algebra expressions for queries, and a project report summarizing the process and challenges encountered. The project aims to enhance academic administration and support analytical queries to improve student performance and departmental efficiency.

Uploaded by

Amer Hosam Elden
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views21 pages

Database Project

The document outlines the design and implementation of a University Course Management System database using Oracle Database, focusing on managing students, professors, courses, and enrollments. It details the relational model, including six tables, SQL DDL for schema creation, data population, relational algebra expressions for queries, and a project report summarizing the process and challenges encountered. The project aims to enhance academic administration and support analytical queries to improve student performance and departmental efficiency.

Uploaded by

Amer Hosam Elden
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Database Project

University Course Management System

BY ORACLE DATABASE

Introduction
This report outlines the design, implementation, and analysis of a University Course Management
System database using Oracle Database. The system is designed to manage students, professors, courses,
and enrollments within a university. The database supports various analytical queries to derive insights
into student academic performance, departmental efficiency, and course management.
The project is divided into several parts, including database schema creation, data population, relational
algebra, SQL queries, and an entity-relationship (ER) model. The final deliverables include SQL scripts,
relational algebra expressions, query results, an ER diagram, and a project report.

Database Design
2.1 Relational Model
The relational model consists of six tables:
1. STUDENTS
o STUDENT_ID (Primary Key)

o NAME

o EMAIL

o PHONE

o DATE_OF_BIRTH

o DEPARTMENT_ID (Foreign Key referencing DEPARTMENTS)

2. PROFESSORS
o PROFESSOR_ID (Primary Key)

o NAME

o EMAIL

o PHONE

o HIRE_DATE

o DEPARTMENT_ID (Foreign Key referencing DEPARTMENTS)

3. DEPARTMENTS
o DEPARTMENT_ID (Primary Key)

o NAME

o BUILDING

4. COURSES
o COURSE_ID (Primary Key)
o NAME

o CREDITS

o DEPARTMENT_ID (Foreign Key referencing DEPARTMENTS)

5. COURSE_ASSIGNMENTS
o COURSE_ID (Foreign Key referencing COURSES)

o PROFESSOR_ID (Foreign Key referencing PROFESSORS)

o (Composite Primary Key: COURSE_ID, PROFESSOR_ID)

6. ENROLLMENTS
o ENROLLMENT_ID (Primary Key)

o STUDENT_ID (Foreign Key referencing STUDENTS)

o COURSE_ID (Foreign Key referencing COURSES)

o SEMESTER

o GRADE

Step 1 : Understanding the Requirements:


The first step was to thoroughly analyze the file provided, which included :
1. Relational Model Tables :
o Entities : Surdents, Processors, Departments, Courses, Enrollments, and Course Assignments.
o Attributes : clearly defined, with primary keys and foreign key relationships.
2. Key Relationships:
o Students enroll in courses via the ENROLLMENTS table.
o Professors teach courses via the COURSE_ASSIGNMENTS table.
o Courses belong to departments, which are Sharad by students and professors.
3. Normalization Needs:
o Ensuring the schema satisfies at least Third Normal Form (3NF).
4. Relational Algebra Expressions:
o Queries to retrieve specific information were provided, requiring expressions to be rewritten
based on the relational model.

SQL DDL for Schema Creation


SQL DDL code to create the tables in Oracle Database:

CREATE TABLE DEPARTMENTS (


DEPARTMENT_ID INT PRIMARY KEY,
NAME VARCHAR(100),
BUILDING VARCHAR(100)
);
CREATE TABLE STUDENTS (
STUDENT_ID INT PRIMARY KEY,
NAME VARCHAR(100),
EMAIL VARCHAR(100),
PHONE VARCHAR(15),
DATE_OF_BIRTH DATE,
DEPARTMENT_ID INT,
FOREIGN KEY (DEPARTMENT_ID) REFERENCES DEPARTMENTS(DEPARTMENT_ID)
);
CREATE TABLE PROFESSORS (
PROFESSOR_ID INT PRIMARY KEY,
NAME VARCHAR(100),
EMAIL VARCHAR(100),
PHONE VARCHAR(15),
HIRE_DATE DATE,
DEPARTMENT_ID INT,
FOREIGN KEY (DEPARTMENT_ID) REFERENCES DEPARTMENTS(DEPARTMENT_ID)
);
CREATE TABLE COURSES (
COURSE_ID INT PRIMARY KEY,
NAME VARCHAR(100),
CREDITS INT,
DEPARTMENT_ID INT,
FOREIGN KEY (DEPARTMENT_ID) REFERENCES DEPARTMENTS(DEPARTMENT_ID)
);
CREATE TABLE COURSE_ASSIGNMENTS (
COURSE_ID INT,
PROFESSOR_ID INT,
PRIMARY KEY (COURSE_ID, PROFESSOR_ID),
FOREIGN KEY (COURSE_ID) REFERENCES COURSES(COURSE_ID),
FOREIGN KEY (PROFESSOR_ID) REFERENCES PROFESSORS(PROFESSOR_ID)
);
CREATE TABLE ENROLLMENTS (
ENROLLMENT_ID INT PRIMARY KEY,
STUDENT_ID INT,
COURSE_ID INT,
SEMESTER VARCHAR(50),
GRADE DECIMAL(3, 2),
FOREIGN KEY (STUDENT_ID) REFERENCES STUDENTS(STUDENT_ID),
FOREIGN KEY (COURSE_ID) REFERENCES COURSES(COURSE_ID)
);
Populate the Tables

 At least 10 students with diverse attributes.


DDL Code:

Data:

 At least 5 professors from different departments.


DDL Code:

Data:
 At least 3 departments.
DDL Code:

Data:

 A variety of courses with different credits and department affiliations.


DDL Code:

Data:
 Enrollment records that include grades for students across different courses.
DDL Code:

Data:

Part
2:

Relational Algebra
Write relational algebra expressions for 5 queries from Part 3.
1. List all students and their departments.
Relational Algebra:

π NAME, DEPARTMENT_ID (STUDENTS ⨝ DEPARTMENTS)


2. Retrieve the names of all professors who teach more than 3 courses.
Relational Algebra:

(COURSE_ASSIGNMENTS)) ⨝ PROFESSORS
σ COUNT(COURSE_ID) > 3 (γ PROFESSOR_ID, COUNT(COURSE_ID)

3. Find the average grade of students enrolled in a specific course (e.g., "Database").
Relational Algebra:

γ AVG(GRADE) (σ NAME = "Database" (COURSES) ⨝ ENROLLMENTS)


4. List all students with a GPA higher than 3.5 (on a 4.0 scale).
Relational Algebra:

σ GRADE > 3.5 (ENROLLMENTS ⨝ STUDENTS)


5. Find the total number of students enrolled in each course, ordered by course name.
Relational Algebra:

γ COURSE_ID, COUNT(STUDENT_ID) (ENROLLMENTS) ⨝ COURSES

Queries (SQL-DML)

1.List all students and their departments.


2. Retrieve the names of all professors who teach more than 3 courses.

3. Find the average grade of students enrolled in a specific course (e.g.,


"Database").
4. List all students with a GPA higher than 3.5 (on a 4.0 scale).
5. Find the total number of students enrolled in each course, ordered by course

name.

6. Retrieve the courses taught by professors who were hired after 2020.
7. List all students who have never taken a course taught by a specific professor (e.g.,
"Dr.Adullah").

8. Find all departments that do not offer any courses.


9. Retrieve the top 3 students with the highest GPA in the university.

10. List all professors who have taught courses where the average grade is below
2.5.
11. Find the department with the highest average student GPA.

12. List students enrolled in courses outside their department.


13. Retrieve the semester(s) where a specific professor taught the most students.

14. Retrieve students who have failed at least 2 courses.


15. Find the average grade for each professor's courses.

16. Retrieve the Department offering the most credits in courses.


17. Retrieve the course(s) with the highest number of enrollments in each
semester.

Part 4: Entity-Relationship Model


Part5: A brief project report summarizing the process.
This project aims to design a comprehensive database system for a university that effectively manages key
entities such as students, professors, courses, and enrollments. The primary objective is to facilitate academic
administration, enhance data accessibility, and support analytical queries to derive insights into student
performance and departmental efficiency.

Project Overview:

Database Design

The database is structured around six core entities:

1. Students: Captures details about students, including their personal information and departmental
affiliation.
2. Professors: Stores information on faculty members and their respective departments.
3. Departments: Represents various academic departments within the university.
4. Courses: Contains data about courses offered, including credits and department associations.
5. Course Assignments: Links courses to the professors who teach them.
6. Enrollments: Records student enrollments in courses along with their grades.

Relational Model:

The relational model was developed to define relationships among these entities. Foreign keys were established
to maintain referential integrity and ensure that the database accurately reflects real-world associations.

SQL DDL Code:

The database schema was created using SQL Data Definition Language (DDL) commands to define tables and
their relationships. The tables were structured to allow for efficient data storage and retrieval.

Data Population:

Sample data was inserted into the tables to facilitate testing and demonstrate functionality. This included:

 10 students with diverse attributes.


 5 professors from different departments.
 3 departments.
 A variety of courses with different credits.
 Enrollment records with corresponding grades.

Relational Algebra Expressions:

Relational algebra expressions were crafted for five key queries to demonstrate the database's analytical
capabilities. These expressions serve as a foundation for SQL queries and help in understanding the underlying
data relationships.

SQL Queries:
A set of SQL Data Manipulation Language (DML) queries was developed to retrieve specific information from
the database. These queries address various academic needs, such as:

 Listing students and their departments.


 Calculating average grades for courses.
 Identifying professors and their teaching loads.
 Analyzing student performance metrics.

Challenges Encountered:

During the project, several challenges were faced:

 Designing the relational model required careful consideration of entity relationships to avoid
redundancy.
 Ensuring data integrity through correct use of foreign keys was crucial for maintaining accurate
associations.
 Crafting SQL queries to meet specific requirements necessitated a deep understanding of SQL syntax
and database operations.

Conclusion:

The University Course Management System project successfully establishes a robust database framework that
efficiently manages academic data. The system is designed to support both administrative functions and
analytical inquiries, ultimately enhancing the university's ability to track and improve student performance and
departmental effectiveness.

This report summarizes the design and implementation process, providing insight into the project's objectives
and outcomes. Future steps may include expanding the system to accommodate additional features and
functionalities based on user feedback and evolving academic needs.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy