0% found this document useful (0 votes)
15 views27 pages

Rough Dbms

Uploaded by

22bca084
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)
15 views27 pages

Rough Dbms

Uploaded by

22bca084
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
You are on page 1/ 27

EXAM RESULT DATA BASE MANAGEMENT SYSTEM

DBMS PROJECT WORK SUBMITTED TO PSGR KRISHNAMMAL COLLEGE


FOR WOMEN IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
FOR THE AWARD OF THE DEGREE OF
BACHELOR OF COMPUTER APPLICATIONS
OF BHARATHIAR UNIVERSITY,
COIMBATORE – 641 046.
EXAM RESULT

ABSTRACT

This project is focused on creating an automated students result management system using
DATA BASE MANAGEMENT SYSTEM. This is a computerized exam results management
system for student’s examination records. The system presents a single platform that will be
used to manage the processing of all examination records within the institution.

The system will store and organize student information, exam details, and
corresponding marks. It will allow users to search and retrieve results
based on various criteria, such as student ID, subject, or semester. Additionally, the system
will generate reports and statistical analysis to help evaluate student performance and identify
areas for improvement.

The project will utilize relational database models to establish relationships between entities
and ensure data integrity. Overall, this project aims to streamline the process of managing and
accessing exam results, providing a comprehensive and reliable platform for all stakeholders.
OBSTACLE:

• Before DBMS, data was stored in separate sites, making it difficult to manage.

• Data integrity, security and consistency were found difficult

• Data was stored in the file system which made it difficult to manage.

• Data was duplicated and consistent across different system.

• Data security was a major concern as it was difficult to restrict access to sensitive data.

RESOLUTION:

• DBMS provided centralized data management.

• DBMS ensures data integrity, security and consistency which were difficult to maintain
earlier.

• DBMS provides a centralized system to manage data.

• DBMS provides a single source of truth data.

• DBMS provides mechanisms for access control and data security.


OBJECTIVES

• The objective of creating a DBMS project for showing exam results could be to provide
a centralized and secure platform for students to view their exam results.

• The project could help to automate the process of generating and publishing exam
results, reducing the workload of the administrative staff.

• The project could provide a platform for teachers to input and manage student grades,
reducing the possibility of errors and ensuring that all grades are recorded accurately.

• It ensures data privacy and protection from unauthorized access or data breaches.

• It enables the generation of customized reports based on specific criteria, such as


individual student performance, subject wise analysis, etc.

• Creating an interface for user to input exam results.

• Designing a user-friendly interface that allows administrators, students and teachers to


access and navigate through the system.

• Overall, the objective of the project would be to make the process of viewing and
managing exam results more efficient, accurate, and accessible.
TABLE DESCRIPTION

TABLE 1 - STUDENT DETAILS

The “STUDENT DETAILS” table stores the details of the students including ROLL
(primary key), NAME, ADDRESS, EMAIL ID, CONTACT,
DEPARTMENT. It uniquely identifies each student using roll number and ensure
mandatory information is provided for name, address, email id, contact number and
department.

Field name Type Index Description

Roll Int Primary key Unique identifier


for each student

Name varchar(20) Not null Student’s name

Address varchar(50) Not null Student’s address

Email id varchar(20) Not null Student’s mail id

Contact Int Not null Student’s contact

Department varchar(20) Not null Student’s


department

TABLE 2 - SUBJECT DETAILS

The “SUBJECT DETAILS” table stores the data including SUBJECT_CODE (primary
key), SUBJECT_NAME, STAFF_ID AND CREDITS. It uniquely identifies each subject
using subject code and ensure mandatory information is provided for subject name, staff id
and credit points.
Field name Type Index Description
Subject_code varchar(10) Primary key Unique identifier
for each subject

Subject_name varchar(20) Not null Subject’s name

Staff_id varchar(20) Not null Staff’s id

Credits Int Not null Credit points


assigned to the
subject

TABLE 3 - EXAM DETAILS

The “EXAM DETAILS” table stores data including EXAM_CODE (primary key),
EXAM_NAME, EXAM_DATE, EXAM_DURATION. It uniquely identifies each exam
using a exam id and ensures mandatory information is provided for exam name, exam date,
exam duration.

Field name Type Index Description


Exam_code varchar(10) Primary key Unique identifier
for each exam

Exam_name varchar(20) Not null exam’s name

Exam_date Int Not null Examination date

Exam_duration Int Not null Duration for each


exam
TABLE 4 – ATTENDANCE

The “ATTENDANCE” table stores the data including ATTENDANCE_ID, (primary key),
A_PERCENT, ROLL (foreign key), TOTA_ NUMBER_OF_WORKING_DAYS,
NUMBER_OF_DAYS_PRESENT. It uniquely identifies each student using Attendance_id
and ensures mandatory information is provided for total number of working days and number
of days present.

FIELD NAME TYPE INDEX DESCRIPTION

Attendance_id Varchar(20) Primary key Unique identifier for


the attendance for
each student
A_points Int Not null Attendance
percentage
Name Varchar(20) Not null Student’ name

Roll Int Foreign key Student’s roll number

Total_Number_ Int Not null Total number of


of_working _days working days
Number_of_days_present Int Not null Total no of days
attended by each
student

TABLE 5 – RESULTS

The “RESULTS” table stores the data including RESULT_ID(primary key), ROLL
(FOREIGN KEY), EXAM_CODE (foreign key), SUBJECT CODE (foreign
key),TOTAL_OBTAINED, ATTENDANCE_ID (foreign key), GRADE_OBTAINED. It
uniquely identifies each student using result_id and ensures mandatory information is provided
for grade obtained.
Field name Type Index Description

Result_id Int primary key Unique identifier for


the result of each
student

Roll Int Foreign key Unique identifier for


each student

Exam_code varchar(50) Foreign key Exam’s code

Subject_code varchar(20) Foreign key Subject’s code

Total_scored Int Not null Subject’s name

Attendance_id Int Foreign key Student’s attendance


id

A_points Int Not null Attendance


percentage for each
student.

Grade_obtained Varchar(10) Not null Marks obtained


by each student

NORMALIZATION

ENTITIES AND ATTRIBUTES:

• STUDENT DETAILS TABLE


- Roll (Primary key)
- Name
-Address
- Email id
- Contact
- Department
• SUBJECT DETAILS TABLE
-Subject_code (primary key)
- Subject_name
- Staff_id
- Credits

• EXAM DETAILS TABLE


-Exam_code (primary key)
-Exam_name
-Exam_date
-Exam_duration

• ATTENDANCE TABLE
-Attendance_id (Primary key)
-A_points
-Name
-Roll (Foreign key)
-Total_no_of_working days
-Number_of_days_present

• RESULT TABLE
-Result_id (Primary key)
-Roll (Foreign key)
-Exam_code (Foreign key)
-Subject_code (Foreign key)
- Total scored
-Attendance_id (Foreign key)
-A_points
-Grade_obtained
CARDINALITY AND RELATIONSHIP:
Result Table:
CARDINALITY: One-to-Many(1:N)
RELATIONSHIP: Each student can get multiple result, but each result is associated with only
one student.

Student Details Table:


CARDINALITY: One-to-Many(1:N)
RELATIONSHIP: Each student can have different contact number, roll number…etc, but each
contact number, roll number..etc, is associated with only one student.

Subject Details Table:


CARDINALITY: One-to-Many(1:N)
RELATIONSHIP: Each subject detail can be associated with multiple student, but each subject
detail is associated with only one student.

Exam Details Table:


CARDINALITY: One-to-many(1:N)
RELATIONSHIP: Each exam detail can be associated with multiple student, but each exam
detail is associated with only one student.

Attendance Table:
CARDINALITY: One-to-many(1:N)
RELATIONSHIP: Each student can be associated with multiple attendance details, but each
attendance detail is associated with only one student.
NORMAL FORM:

STUDENT DETAILS TABLE

1.First Normal form(1NF):


- Each column contains only one atomic value, so the table is in 1NF.
2. Second normal form(2NF):
- there are no partial dependencies, as all non-key attributes depend on the entire
primary key(Roll), so the table is in 2NF.
3. Third normal form(3NF):
- There are no transitive dependencies, as all non-key attributes depend directly on the
primary key(Roll). Therefore, the table is 3NF.

SUBJECT DETAILS TABLE


1.First Normal form(1NF):
- Each column contains only one atomic value, so the table is in 1NF.
2. Second normal form(2NF):
- there are no partial dependencies, as all non-key attributes depend on the entire
primary key (Subject_code), so the table is in 2NF.
3. Third normal form(3NF):
- There are no transitive dependencies, as all non-key attributes depend directly on the
primary key (Subject_code). Therefore, the table is 3NF.

EXAM DETAILS TABLE

1.First Normal form(1NF):


- Each column contains only one atomic value, so the table is in 1NF.
2. Second normal form(2NF):
- there are no partial dependencies, as all non-key attributes depend on the entire
primary key (Exam_code), so the table is in 2NF.
3. Third normal form(3NF):
- There are no transitive dependencies, as all non-key attributes depend directly on the
primary key (Exam_code). Therefore, the table is 3NF.
ATTENDANCE TABLE:

1.First Normal form(1NF):


- Each column contains only one atomic value, so the table is in 1NF.
2. Second normal form(2NF):
- there are no partial dependencies, as all non-key attributes depend on the entire
primary key (Attendance_id), so the table is in 2NF.
3. Third normal form(3NF):
- There are no transitive dependencies, as all non-key attributes depend directly on the
primary key (Attendance_id). Therefore, the table is 3NF.

RESULT TABLE

1.First Normal form(1NF):


- Each column contains only one atomic value, so the table is in 1NF.
2. Second normal form(2NF):
- there are no partial dependencies, as all non-key attributes depend on the entire
primary key (Result_id), so the table is in 2NF.
3. Third normal form(3NF):
- There are no transitive dependencies, as all non-key attributes depend directly on the
primary key (Result_id). Therefore, the table is 3NF.

ER DIAGRAM
Primary key

STUDENT DETAILS TABLE : Roll – Student roll number


SUBJECT DETAILS TABLE : Subject_code
EXAM DETAILS TABLE : Exam_code
ATTENDANCE TABLE : Attendance_id
RESULT TABLE : Result_id

Foreign Key

STUDENT DETAILS TABLE : NIL


SUBJECT DETAILS TABLE : NIL
EXAM DETAILS TABLE : NIL
ATTENDANCE TABLE : Roll – Student roll number
RESULT TABLE :

Composite Key

STUDENT DETAILS TABLE :


SUBJECT DETAILS TABLE :
EXAM DETAILS TABLE :
ATTENDANCE TABLE :
RESULT TABLE :

Composite Attributes :
Simple Attributes

STUDENT DETAILS TABLE :


SUBJECT DETAILS TABLE :
EXAM DETAILS TABLE :
ATTENDANCE TABLE :
RESULT TABLE :

Single Valued Attributes

STUDENT DETAILS TABLE :


SUBJECT DETAILS TABLE :
EXAM DETAILS TABLE :
ATTENDANCE TABLE :
RESULT TABLE :

Multi Valued Attributes :

Derived Attributes :

Stored Attributes

STUDENT DETAILS TABLE :


SUBJECT DETAILS TABLE :
EXAM DETAILS TABLE :
ATTENDANCE TABLE :
RESULT TABLE :
Complex Attributes : NIL

Null Value Attributes

STUDENT DETAILS TABLE :


SUBJECT DETAILS TABLE :
EXAM DETAILS TABLE :
ATTENDANCE TABLE :
RESULT TABLE :

Key Attributes

STUDENT DETAILS TABLE :


SUBJECT DETAILS TABLE :
EXAM DETAILS TABLE :
ATTENDANCE TABLE :
RESULT TABLE :

Value Set of Attributes

STUDENT DETAILS TABLE :


SUBJECT DETAILS TABLE :
EXAM DETAILS TABLE :
ATTENDANCE TABLE :
RESULT TABLE :
4. DATA DEFINITION LANGUAGE

DDL is a subset of SQL used to define and manage the structure of a database, including
creating, altering, and deleting database objects like tables, indexes, and constraints.

4.1. Create : WRITE QUERY TO CREATE A TABLE NAMED “ STUDENT_DETAILS”


THAT RECORDS THE INFORMATION ABOUT THE CUSTOMER.

sql> CREATE TABLE STUDENT_DETAILS ( Roll INT PRIMARY KEY, Name


VARCHAR(20), Address VARCHAR(20), Email_id VARCHAR(20), Contact INT,
Department VARCHAR(20));

4.2. ALTER : WRITE A QUERY TO ADD A NEW COLUMN “GENDER” TO THE


STUDENT_DETAILS TABLE.

mysql>ALTER TABLE STUDENT_DETAILS ADD GENDER VARCHAR(20);


Query OK, 0 rows affected (0.02)
Records: 0 Duplicates: 0 Warnings: 0

4.3. RENAME : WRITE A QUERY TO CHANGE THE TABLE NAME FROM


“STUDENT_DETAILS” TO “ STUDENT_INFO”.

mysql> ALTER TABLE STUDENT_DETAILS RENAME TO STUDENT_INFO;


Query OK, 0 rows affected (0.01 sec)

4.4. TRUNCATE : WRITE A QUERY TO TRUNCATE THE VALUES STORED IN THE


VALUES STORED IN THE “STUDENT_INFO” TABLE.
mysql> TRUNCATE STUDENT_INFO;
Query OK, 0 rows affected (0.01 sec)

4.5. DROP : WRITE A QUERY TO DROP THE TABLE.

mysql> DROP TABLE STUDENT_INFO;


Query OK, 0 rows affected (0.01 sec)

5. DATA MANIPULATION LANGUAGE

DML is a subset of SQL used to manipulate data stored in a database, including operations like
selecting, inserting, updating, and deleting data within tables.

5.1. INSERT : WRITE A QUERY TO INSERT VALUES INTO THE “CUSTOMER”


TABLE.

mysql> INSERT INTO STUDENT_DETAILS VALUES( 5, ‘Thea A’, ‘16, Venkataswamy


road, cbe 7’, ‘ The05@gmail.com’, 6782910838, ‘BCA’);
Query OK, 1 row affected (0.01 sec)

5.2. SELECT : WRITE A QUERY TO DISPLAY THE DETAILS STORED IN


“STUDENT_DETAILS” TABLE.

mysql> SELECT * FROM STUDENT_DETAILS;


5 Rows in set (0.00 sec)

5.3. UPDATE : WRITE A QUERY TO UPDATE THE Department AS “BBA” WHERE THE
Roll=4.

mysql> UPDATE STUDENT_DETAILS SET Department=”BBA” WHERE Roll=4;


Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

5.4. DELETE : WRITE A QUERY TO DELETE THE DETAILS OF THE STUDENT


WHOSE Roll=3.

mysql> DELETE FROM STUDENT_DETAILS WHERE Roll= 3;


Query OK, 1 row affected (0.01 sec)

6. DATA CONTROL LANGUAGE


DCL is used to control access and permissions within a database. It includes commands like
GRANT (to provide access rights) and REVOKE (to remove access rights).

6.1. GRANT : WRITE A QUERY TO GRANT PERMISSION TO THE USER TO VIEW


DATA IN THE STUDENT_DETAILS TABLE.

mysql> CREATE USER ‘ZOHO’@’localhost’ IDENTIFIED BY ‘passwrd’;


Query OK, 0 rows affected (0.01 sec)

mysql> GRANT SELECT ON exam_details TO ‘ZOHO’@’LOCALHOST’;


Query OK, 0 rows affected (0.00 sec)

6.2. REVOKE : WRITE A QUERY TO REVOKE THE PERMISSION PROVIDED TO


THE USER.

mysql> REVOKE SELECT ON EXAM_DETAILS FROM ‘ZOHO’@’localhost’;


Query OK, 0 rows affected (0.00 sec)

7. TRANSACTION CONTROL LANGUAGE


TCL is used to manage transaction in a database. It includes commands like COMMIT (to save
changed), ROLLBACK (to undo changes), and SAVEPOINT (to set a point for partial
rollback).

7.1 COMMIT : WRITE QUERY TO SAVE THE CHANGES MADE IN


“EXAM_DETAILS” TABLE PERMANENTLY.

mysql> UPDATE EXAM_DETAILS SET EXAM_DATE=6/2/2020 WHERE EXAM_CODE


”PE2205”;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> COMMIT;
Query OK, 0 rows affecyed (0.00 sec)

7.2 ROLL BACK : WRITE A QUERY TO UNDO THE CHANGES MADE IN


EXAM_DETAILS.

mysql>INSERT INTO EXAM_DETAILS VALUES(‘DS2206’, ’Semester’, ’6/2/2020’,


2Hrs’);
Query OK, 1 row affected (0.00 sec)

mysql> ROLLBACK;
Query OK, 0 rows affected (0.00 sec)

mysql> COMMIT;
Query OK, 0 rows affected (0.00 sec)

7.3. SAVEPOINT : WRITE A QUERY TO CREATE AND ROLLBACK TO A


SAVEPOINT.

mysql> SAVEPOINT ONE;


Query OK, 0 rows affected (0.00 sec)

mysql> DELETE FROM EXAM_DETAIL WHERE EXAM_CODE=”DS2206”;


Query OK, 1 row affected (0.00 sec)

mysql> ROLLBACK TO ONE;


Query OK, 0 rows affected (0.00 sec)

mysql> COMMIT;
Query OK, 0 rows affected (0.00 sec)

8. DATA INTEGRETY CONSTRAINS

8.1. PRIMARY KEY - Ensures uniqueness and identifies each row uniquely in a table.

CREATE :

mysql>CREATE TABLE SUBJECT_DETAILS ( Subject_code VARCHAR(20),


Subject_name varchar(20), Staff_id varchar(20), Credits int);
Query OK, 0 rows affected (0.00 sec)

INSERT :

mysql> INSERT INTO SUBJECT_DETAILS ( ‘12A’, ‘Lang 1- Tamil’,’AP876’,100);


Query OK, 0 rows affected (0.00 sec)

8.2. FOREIGN KEY - Enforces referential integrity by linking two tables.


-
CREATE :
mysql> CREATE TABLE ATTENDANE (ATTENDANCE_ID VARCHAR(20), A_POINTS
INT, NAME VARCHAR(20), ROLL INT, FOREIGN KEY (ROLL) REFERENCES
STUDENT_DETAIL(Roll) TOTAL_NUMBER_OF_WORKING_DAYS INT,
NUMBER_OF_DAYS_PRESENT INT);
Query OK, 0 rows affected (0.01 sec)

INSERT :

mysql> INSERT INTO ATTNDANCE ( ‘AT011’,4,’Arya A’,1,100,80);

8.3. NOT NULL - Ensures that a column cannot have a null (empty) value.

CREATE :

mysql> CREATE TABLE STUDENT_DETAILS (Roll INT PRIMARY KEY, Name


VARCHAR(20) NOT NULL, Address VARCHAR(50, Email VARCHAR(20) NOT NULL,
Contact INT NOT NULL, Department VARCHAR(20) NOT NULL);
Query OK, 0 rows affected (0.00 sec)

INSERT :

mysql> mysql> INSERT INTO STUDENT_DETAILS VALUES( 1,’Arya A’, ’83,nilgiri


street, cbe 7’,’Arya01@gmail.com’,9894032847,’BCA’);
Query OK, 0 rows affected (0.00 sec)

8.4. UNIQUE - Ensures that values in a column are unique across rows.

CREATE:
mysql> CREATE TABLE EXAM_DETAILS TABLE(Exam_code varchar PRIMARY
KEY, Exam_name VARCHAR(20), Exam_date VARCHAR(20) UNIQUE, Exam_duration
VARCHAR(20));
Query OK, 0 rows affected (0.01 sec)

INSERT :

mysql> INSERT INTO EXAM_DETAILS VALUES(‘MAT2203’,’Semester’,’3/2/2020’,’2


hrs’);
Query OK, 0 rows affected (0.00 sec)

8.5. CHECK - Defines conditions that must be met for data in a column.

CREATE :

mysql> CREATE TABLE EXAM_DETAILS VALUES(Exam_code VARCHAR(20),


Exam_name VARCHAR(20), Exam_date VARCHAR(20), Exam_duration
VARCHAR(20),CHECK(Exam_duration =2hrs));
Query OK, 0 rows affected (0.01 sec)

INSERT :

mysql> INSERT INTO EXAM_DETAILS VALUES ( ‘CPP2204’,’Semester’,’4/2/2020’,’2


hrs’);
Query OK, 0 rows affected (0.00 sec)
9. AGGREGATE FUNCTIONS AND SORTING

AGGREGATE FUNCTIONS ARE SPECIAL FUNCTIONS THAT PERFORM


CALCULATIONS ON A SET OF VALUES AND RETURN A SINGLE RESULT. THESE
FUNCTIONS ALLOW YOU TO SUMMARIZE OR AGGREGATE DATA IN A TABLE OR
A RESULT SET.

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