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

DBMS_ADI

Uploaded by

Aditya Swaroop
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 views

DBMS_ADI

Uploaded by

Aditya Swaroop
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/ 19

RAMANUJAN COLLEGE

Academic Year: 2023-24

Department: Computer Science

Name of Assignment: Database Management System

Full Name: Aditya Swaroop

Roll No.: 20221405

Exam Roll No: 22020570028

Student Sign: Professor Sign:


Creating database and using it:-

Creating three tables STUDENT, SOCIETY,


ENROLLMENT:-
Inserting data in the STUDENT table:-
Inserting data in SOCIETY table:-

Inserting data in the ENROLLMENT table:-


1. Retrive the names of the students enrolled in
any society
ANS:-

2. Retrieve society names


Ans:-
3. Retrieve students’ name starting with letter A
Ans:-

4. Retrieve students' details studying in courses


‘computer science’ or ‘English’.
Ans:-

5. Retrieve students’ names whose roll no either


starts with ‘X’ or ‘Z’ and ends with ‘9’
Ans:-

6. Find society details with more than N TotalSeats


where N is to be input by the user
Ans:-
7. Update society table for mentor name of a
specific society
ANS:-

8. Find Society Names Where More Than 3


Students Have Enrolled:-
Ans:-

9. Find Name of The Youngest Student Enrolled


In Entrepreneurship_Lab Society:
Ans:-
10. Find Name of The Most popular
Society(number of people enrolled in it):
Ans:-

11. Find the name of two least popular societies


(on the basis of enrolled students).
Ans:-
12. Find the student names who are not
enrolled in any society.
Ans:-

13. Find the student names enrolled in at least


two societies.
Ans:-

14. Find society names In which maximum


students are enrolled .
Ans:-

15. Find names of all students who have


enrolled in any society and society names in
which at least one student has enrolled .
Ans:-

16. Find names of students who are enrolled in


any of the three societies 'Quicksort' , 'DNA'
and 'Jazba'.
ANS:-

17. Find society names such that its mentor has


a name with 'Gaurav' in it.
Ans:-
18. Find the society names in which the number
of enrolled students is only 10% of its capacity.
Ans:-

19. Display the vacant seats for each society.


Ans:-
20. Increment Total Seats of each society by
10%.
Ans:-
21. Add the enrollment fees paid (‘yes'/'No')
field in the enrollment table.
Ans:-

22. Update date of enrollment of society id ‘100’


to ‘2018-01-15’, ‘101’ to current date and ‘111’
to ‘2018-01-02’.
Ans:-
23. Create a view to keep track of society names
with the total number of students enrolled in it.
Ans:-
24. Find student names enrolled in all the
societies.
Ans:-
25. Count the number of societies with more
than 5 students enrolled in it
Ans:-

26. Add column Mobile number in student


table with default value ‘9999999999’
Ans:-
27. Find the total number of students whose age
is > 20 years.
Ans:-
28. Find names of students who are born in
2003 and are enrolled in at least one society.
Ans:-

29. Count all societies whose name starts with


'N' and ends with ‘S’ and at least 1 students are
enrolled in the society.
Ans:-

30. Display the following information:


i.) Society name
ii.) Mentor name
iii.) Total Capacity
iv.) TotalEnrolled
v.) Unfilled Seats
Ans:-

You might also like