0% found this document useful (0 votes)
4 views

Student_Database_Management_Project_Updated

It is for sql project for class 12

Uploaded by

dadu27973
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Student_Database_Management_Project_Updated

It is for sql project for class 12

Uploaded by

dadu27973
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Student Database Management System

Objective:

To create a database management system that stores and manages student records, including

personal details,

academic performance, and attendance, using SQL.

Tools and Software:

1. Database Management Tool: MySQL, PostgreSQL, or SQLite

2. Editor: MySQL Workbench, VS Code, or any text editor

(Optional) Frontend: HTML/Python for user interface (if required)

Database Design:

The database will include the following tables:

1. Students Table

| Column Name | Data Type | Constraints |

|--------------|-------------|------------------------|

| Student_ID | INT | PRIMARY KEY |

| Name | VARCHAR(50) | NOT NULL |

| DOB | DATE | |

| Gender | CHAR(1) | CHECK (Gender IN ('M', 'F')) |

| Address | VARCHAR(255)| |

| Phone | VARCHAR(15) | UNIQUE |

SQL Queries:
1. Create Students Table

CREATE TABLE Students (

Student_ID INT PRIMARY KEY,

Name VARCHAR(50) NOT NULL,

DOB DATE,

Gender CHAR(1) CHECK (Gender IN ('M', 'F')),

Address VARCHAR(255),

Phone VARCHAR(15) UNIQUE

);

2. Insert Records

INSERT INTO Students (Student_ID, Name, DOB, Gender, Address, Phone)

VALUES (1, 'John Doe', '2005-06-15', 'M', '123 Main St', '9876543210');

3. Fetch All Students

SELECT * FROM Students;

4. Attendance Summary

SELECT Students.Name, COUNT(*) AS Total_Classes,

SUM(CASE WHEN Status = 'P' THEN 1 ELSE 0 END) AS Present

FROM Attendance

INNER JOIN Students ON Attendance.Student_ID = Students.Student_ID

GROUP BY Students.Name;

Sample Output:
1. Students Table Output:

+------------+----------+------------+--------+---------------+------------+

| Student_ID | Name | DOB | Gender | Address | Phone |

+------------+----------+------------+--------+---------------+------------+

|1 | John Doe | 2005-06-15 | M | 123 Main St | 9876543210 |

+------------+----------+------------+--------+---------------+------------+

2. Attendance Summary:

+----------+----------------+---------+

| Name | Total_Classes | Present |

+----------+----------------+---------+

| John Doe | 10 |8 |

+----------+----------------+---------+

Conclusion:

The Student Database Management System effectively manages student data, including their

personal details, academic performance, and attendance. This project demonstrates the

practical application of SQL in creating and managing relational databases.


Student Database Management System

Objective:

To create a database management system that stores and manages student records, including

personal details,

academic performance, and attendance, using SQL.

Tools and Software:

1. Database Management Tool: MySQL, PostgreSQL, or SQLite

2. Editor: MySQL Workbench, VS Code, or any text editor

(Optional) Frontend: HTML/Python for user interface (if required)

Database Design:

The database will include the following tables:

1. Students Table

| Column Name | Data Type | Constraints |

|--------------|-------------|------------------------|

| Student_ID | INT | PRIMARY KEY |

| Name | VARCHAR(50) | NOT NULL |

| DOB | DATE | |

| Gender | CHAR(1) | CHECK (Gender IN ('M', 'F')) |

| Address | VARCHAR(255)| |

| Phone | VARCHAR(15) | UNIQUE |

SQL Queries:

You might also like