lOMoARcPSD|34467512
Worksheet XII SQL Basic
computer graphics (Silver Oak College of Engineering and Technology)
Studocu is not sponsored or endorsed by any college or university
Downloaded by Deivanai K CS (
[email protected])
lOMoARcPSD|34467512
REVISION WORKSHEET 2022-23
Subject: Computer Science Grade: XII
Marks: Time: 40 mins
Name: ___________ Date: 29-07-2022
1. Execute and write queries (a) to (d) based on the table DEPARTMENT given below:
(a) To display all department names.
(b) To display department name and floorno of dept id D002.
(c) To display all records of the department in floorno 10
(d) To display the lowest floorno.
2. In a multiplex, movies are screened in different auditoriums. One movie can be shown in more than one
auditorium. In order to maintain the record of movies, the multiplex maintains a relational database consisting of two
relations viz. MOVIE and AUDI respectively as shown below:
Movie(Movie_ID, MovieName, ReleaseDate)
Audi(AudiNo, Movie_ID, Seats, ScreenType, TicketPrice)
a) Is it correct to assign Movie_ID as the primary key in the MOVIE relation? If no, then suggest an
appropriate primary key.
b) Is it correct to assign AudiNo as the primary key in the AUDI relation? If no, then suggest appropriate
primary key.
c) Is there any foreign key in any of these relations?
Page 1 of 2
lOMoARcPSD|34467512
2.
For the above given database STUDENT-PROJECT, answer the following:
a) Name primary key of each table.
b) Find foreign key(s) in table PROJECT-ASSIGNED.
c) Is there any alternate key in table STUDENT? Give justification for your answer.
Can a user assign duplicate value to the field RollNo of STUDENT table? Jusify.
For the above given database STUDENT-PROJECT, can we perform the following operations? Insert a student
record with missing roll number value.
a) Insert a student record with missing registration number value.
b) Insert a project detail without submission-date.
c) Insert a record with registration ID IP-101-19 and ProjectNo 206 in table PROJECT-ASSIGNED.
3.
Page 2 of 2