0% found this document useful (0 votes)
47 views4 pages

Database Management System Design Guide

The document outlines a database management system design that includes tables for students, courses, enrollments, and grades, detailing their respective columns and relationships. It provides SQL queries for basic operations such as adding students and courses, enrolling students, and assigning grades, as well as advanced queries for generating reports and transcripts. Additionally, it suggests optional features for a user interface and functionalities like student login, admin dashboard, course prerequisites, and email notifications.

Uploaded by

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

Database Management System Design Guide

The document outlines a database management system design that includes tables for students, courses, enrollments, and grades, detailing their respective columns and relationships. It provides SQL queries for basic operations such as adding students and courses, enrolling students, and assigning grades, as well as advanced queries for generating reports and transcripts. Additionally, it suggests optional features for a user interface and functionalities like student login, admin dashboard, course prerequisites, and email notifications.

Uploaded by

nirajmanale1585
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Subject: Database Management Systems

Roll No : 73
Submitted by: NIRAJ MANALE

System Design and Database Schema:


1. Database Tables:

1.1 Students Table

 Table Name: students


 Columns:
o student_id (Primary Key) - Integer
o first_name - Varchar(50)
o last_name - Varchar(50)
o dob - Date
o email - Varchar(100)
o phone_number - Varchar(15)

1.2 Courses Table

 Table Name: courses


 Columns:
o course_id (Primary Key) - Integer
o course_name - Varchar(100)
o description - Varchar(255)
o credits - Integer

1.3 Enrollments Table

 Table Name: enrollments


 Columns:
o enrollment_id (Primary Key) - Integer
o student_id (Foreign Key) - Integer (References students(student_id))
o course_id (Foreign Key) - Integer (References courses(course_id))
o enrollment_date - Date
o status - Varchar(20) (e.g., 'Active', 'Completed', 'Dropped')

1.4 Grades Table

 Table Name: grades


 Columns:
o grade_id (Primary Key) - Integer
o enrollment_id (Foreign Key) - Integer (References
enrollments(enrollment_id))
o grade - Varchar(2) (e.g., 'A', 'B+', 'C', etc.)
o date_assigned - Date
SQL Queries and Operations:

2.1 Basic SQL Queries:

1. Add a new student:

sql
CopyEdit
INSERT INTO students (first_name, last_name, dob, email,
phone_number)
VALUES ('John', 'Doe', '2000-05-15', '[Link]@[Link]', '123-
456-7890');

2. Add a new course:

sql
CopyEdit
INSERT INTO courses (course_name, description, credits)
VALUES ('Database Systems', 'Introduction to database management
systems', 3);

3. Enroll a student in a course:

sql
CopyEdit
INSERT INTO enrollments (student_id, course_id, enrollment_date,
status)
VALUES (1, 101, '2025-04-01', 'Active');

4. Assign a grade to a student in a course:

sql
CopyEdit
INSERT INTO grades (enrollment_id, grade, date_assigned)
VALUES (1, 'A', '2025-06-15');

5. View a student’s course enrollment history:

sql
CopyEdit
SELECT s.first_name, s.last_name, c.course_name, [Link]
FROM students s
JOIN enrollments e ON s.student_id = e.student_id
JOIN courses c ON e.course_id = c.course_id
LEFT JOIN grades g ON e.enrollment_id = g.enrollment_id
WHERE s.student_id = 1;

6. View students with a grade higher than 'B':

sql
CopyEdit
SELECT s.first_name, s.last_name, c.course_name, [Link]
FROM students s
JOIN enrollments e ON s.student_id = e.student_id
JOIN courses c ON e.course_id = c.course_id
JOIN grades g ON e.enrollment_id = g.enrollment_id
WHERE [Link] > 'B';

2.2 Advanced SQL Queries:

1. Generate a report for all students in a specific course:

sql
CopyEdit
SELECT s.first_name, s.last_name, e.enrollment_date
FROM students s
JOIN enrollments e ON s.student_id = e.student_id
JOIN courses c ON e.course_id = c.course_id
WHERE c.course_name = 'Database Systems';

2. Generate a student transcript (including all courses and grades):

sql
CopyEdit
SELECT s.first_name, s.last_name, c.course_name, [Link]
FROM students s
JOIN enrollments e ON s.student_id = e.student_id
JOIN courses c ON e.course_id = c.course_id
JOIN grades g ON e.enrollment_id = g.enrollment_id
WHERE s.student_id = 1
ORDER BY c.course_name;

3. List courses with the highest enrollment:

sql
CopyEdit
SELECT c.course_name, COUNT(e.student_id) AS num_enrolled
FROM courses c
JOIN enrollments e ON c.course_id = e.course_id
GROUP BY c.course_name
ORDER BY num_enrolled DESC;

User Interface Design (Optional for the project):

For a complete project, you can implement a simple User Interface (UI) that allows users
(students and admins) to interact with the database. You can use HTML, PHP, or a Python
framework like Flask or Django to create the UI.

Additional Features (Optional):

 Student login: Implement user authentication for students to view and update their
information.
 Admin dashboard: Allow administrators to add/remove courses, assign grades, and
manage student enrollments.
 Course prerequisites: Add a feature to check if a student meets the prerequisites
before enrolling in a course.
 Email notifications: Send email confirmations for successful enrollment and grade
assignments.

You might also like