You are on page 1of 23

MEDI - CAPS UNIVERSITY

INDORE

Lab File

DEPARTMENT OF COMPUTER SCIENCE

BRANCH : CS – DATA SCIENCE

CS3CO25 - DATABASE MANAGEMENT SYSTEM

SUBMITTED TO : SUBMITTED BY :
Mr. HITESH ARJARIA VRINDA PAREEK
EN19CS303059
E
Index
S. Date of Page Date of
Title
No. Implementation No. Submission
Create a Student table that contains
Columns as
 Student's Roll_Number
 Name
 Age
1. 04 – 02 - 2021 1–2 11 – 02 - 2021
 Gender
 Semester
 Address
 Marks
 Library_ID

Alter the Student table using Integrity


Constants in which
 Set RollNumber as Primary Key 11 – 02 - 2021 3–4 18 – 03 - 2021
2.
 Set Name and Address as NOT NULL
 Set LibraryID as UNIQUE

Create a LibraryRecord table that


contains Columns as
 Library_ID
 Book_ID
3.  Book_Name 18 – 03 - 2021 5–6 25 – 03 - 2021
 Author
 Issue_Date
 FineOfStudent
 Total_Feed

Alter the LibraryRecord table using


Integrity Constants in which
4. 25 – 03 - 2021 7–8 04 – 03 - 2021
 Set Library_ID as Primary Key
 Set Book_ID as NOT NULL
Perform following Operations :
 Insert 5 entries in the both Student
and LibraryRecord table
 Delete 2 records from Student and
LibraryRecord table whose Roll
Numbers are 177 and 362 and Book
Name are “DBMS Concepts” and
5. “Automata Theory” respectively. 04 – 03 - 2021 9 – 14 18 – 03 – 2021
 Update address of a Student Roll
Number is 274 with “Siyaganj,
Indore”.
 Update Book information such as
Book_ID with 964 and Book_Name
with “Core Java Volume – 1” for a
Student whose LibraryID is 127.
Index
Find the Name of the Student who has
6. 18 – 03 – 2021 15 25 – 03 – 2021
book named as Quantum Physics

Find the Roll Number of a Students who


7. 25 – 03 – 2021 16 01 – 04 – 2021
paid fine 100/- for the Library

Fetch the address of the Student who


8. has issued a book named Theory of 01 – 04 – 2021 17 08 – 04 – 2021
Computation on date 31 March 2021.

Display the Library_ID of Students


sorted in both ascending and
9. 08 – 04 – 2021 18 15 – 04 – 2021
descending order according to fine paid
by them.

Display the Name of the Students sorted


10. in descending order according to fine 15 – 04 - 2021 19 22 – 04 – 2021
paid by them.

Experiment - 1
Q. Create a Student table that contains Columns as
 Student's Roll_Number
 Name
 Age
 Gender
 Semester
 Address
 Marks
 Library_ID

Query Performed :
Table Structure :
Experiment - 2

Q. Alter the Student table using Integrity Constants in which


 Set RollNumber as Primary Key
 Set Name and Address as NOT NULL
 Set LibraryID as UNIQUE

Query Performed :
Table Structure :
Experiment - 3

Q. Create a LibraryRecord table that contains Columns as


 Library_ID
 Book_ID
 Book_Name
 Author
 Issue_Date
 FineOfStudent
 Total_Feed

Query Performed :
Table Structure :
Experiment - 4

Q. Alter the LibraryRecord table using Integrity Constants in which


 Set Library_ID as Primary Key
 Set Book_ID as NOT NULL

Query Performed :
Table Structure :
Experiment - 5

Q. Perform following Operations :


 Insert 5 entries in the both Student and LibraryRecord table

Query Performed ( For Student Table ) :


Student Table is like :

Query Performed ( For Library_Record Table ) :

LibraryRecord Table is like :


 Delete 2 records from Student and LibraryRecord table whose Roll Numbers are
177 and 362 and Book Name are “DBMS Concepts” and “Automata Theory”
respectively.

Query Performed ( For Student Table ) :


Now Student Table is like :

Query Performed ( For LibraryRecord Table ) :

Now LibraryRecord Table is like :


 Update address of a Student whose Roll Number is 274 with “Siyaganj, Indore”.

Query Performed :
Now Student Table is Like :

 Update Book information such as Book_ID with 964 and Book_Name with “Core
Java Volume – 1” for a Student whose LibraryID is 127.

Query Performed :
Now LibraryRecord Table is like :

Experiment - 6

Q. Find the Name of the Student who has book named


as Quantum Physics.

Query Performed and Result :


Experiment - 7

Q. Find the Roll Number of a Students who paid fine 100/- for the Library.

Query Performed and Result :


Experiment - 8

Q. Fetch the address of the Student who has issued a book named Theory of
Computation on date 31 March 2021.

Query Performed and Result :


Experiment - 9

Q. Display the Library_ID of Students sorted in both ascending and descending order
according to fine paid by them.

Query Performed and Result :


Experiment - 10

Q. Display the Name of the Students sorted in descending order according to fine paid
by them.

Query Performed and Result :

You might also like