Dbms Project PDF

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

1

Introduction
Project Overview:
The goal of this project is to create a database-driven time
table management system for a school or university. This
system will allow administrators to define courses,
instructors, students, and schedule classes.

Database Schema:
Create the database schema by defining tables for the
following entities:
-
Students

student_id (Primary Key)

student_name

student_email

student_address

student_pno

student_dob

student_age

-
Instructors

instructor_id (Primary Key)

instructor_name

instructor_email

instructor_address

instructor_salary

instructor_designation

Chahat Chhabra 25037


CSE-1
2

- Courses

course_id (Primary Key)

course_name

course_duration

-
Classes

class_id (Primary Key)

course_id (Foreign Key referencing Courses)

instructor_id (Foreign Key referencing
Instructors)

room

start_time

end_time

day_of_week

Chahat Chhabra 25037


CSE-1
3

ER Diagram

Chahat Chhabra 25037


CSE-1
4

The following are tabular representation


of above entities and relationships:

Students
Column Name Datatype Constraints

student_id Int Primary key


student_nam varchar() NOT NULL
student_email varchar() NOT NULL
student_address varchar() NOT NULL
student_pno Int NOT NULL
student_dob Date NOT NULL
student_age Int NOT NULL

Instructors
instructor_id Int Primary Key
instructor_name varchar() NOT NULL
instructor_email varchar() NOT NULL
instructor_addres s varchar() NOT NULL

instructor_salary Int NOT NULL


instructor_design varchar() NOT NULL
ation

Chahat Chhabra 25037


CSE-1
5

Courses

course_id Int Primary Key


course_name varchar() NOT NULL
course_duration varchar() NOT NULL

Classes
class_id Int Primary Key
course_id Int Foreign Key
instructor_id Int Foreign Key
room Int NOT NULL
start_time Time NOT NULL
end_time Time NOT NULL
day_of_week Int NOT NULL

Chahat Chhabra 25037


CSE-1
6

SQL Queries

Creating tables

Chahat Chhabra 25037


CSE-1
7

Insert Data
Insert a new student into the Students table

Insert a new instructor into the Instructors table.

Add a new course to the Courses table.

Chahat Chhabra 25037


CSE-1
8

Retrive Data

Retrieve the list of all instructors.

Find all classes taught by a specific instructor.

Retrieve the students enrolled in a specific course.

Update Data
Update student information (e.g., email) based on student name.

Change the instructor of a particular class.

Chahat Chhabra 25037


CSE-1
9

Delete Data
Delete a student record.

Remove an instructor from the Instructors table.

Reports
Generate a report that lists all classes with their respective instructors.

Generate a report that lists the students enrolled in each class.

Create a report showing the class schedule for a specific day and time.

Chahat Chhabra 25037


CSE-1
10

Generate a report that lists all available time slots for classes.

Find the class with the most students enrolled.

Calculate total number of hours each instructor is scheduled to teach.

List classes that have overlapping schedules.

Find classes with no students enrolled.

Chahat Chhabra 25037


CSE-1

You might also like