DBMS Solution-1
DBMS Solution-1
Total Marks : 20
Question 1
Which level of abstraction describes types of data that are stored in the Database?
Marks: 2 MCQ
a) Physical level
b) Logical level
c) View level
d) Abstraction level
Answer: b)
Explanation: We have three levels of abstraction:
Physical level: This is the lowest level of data abstraction. It describes how data is physi-
cally stored in database.
Logical level: This is the middle level of 3-level data abstraction architecture. It describes
which type of data is stored in database.
View level: The highest level of data abstraction. This level describes the user interaction
with database system.
Hence, option b) is correct.
1
Question 2
Identify the valid primary key for the relation paper info from the given instance.
Marks: 2 MCQ
paper info
paper id corresponding Author conference id Area
1005 Steven 1654 HCI
2134 Dave 1654 HCI
367 Himani 6743 5G
1005 Steven 6743 5G
4987 Himani 6743 HCI
a) paper id
Answer: d)
Explanation: A primary key needs to uniquely identify each record in a table. So option d)
is the correct option. Other options are incorrect as these attributes do not identify each tuple
uniquely.
2
Question 3
Identify the correct statement/s. Marks:2 MCQ
Answer: c)
Explanation: (2245, HardFort) is an instance of the schema Project(pCode, pName)
3
Question 4
Consider a relation Vehicle(VID, Model, Speed, Color) where the superkeys are as follows:
{VID}, {VID, Model}, {Speed, Color}, {Speed, Color, Model}.
Select the possible candidate key(s). Marks: 2 MSQ
a) {VID}
b) {Speed}
c) {Color}
d) {Speed, Color}
Answer: a), d)
Explanation: Minimal superkeys are candidate keys. Here, VID alone is a superkey, hence,
any superset of VID will also be a superkey. But only VID can be a candidate key. Similarly,
{Speed, Color} is a superkey and so is any of its superset. But, {Speed, Color} is minimal,
as, removing any one attribute from the set makes it ineligible to remain as a superkey. So
{Speed, Color} is also a valid candidate key.
Hence, (a) and (d) are correct options.
4
Question 5
Consider the following relations:
Book(ISBN,Title,Pages)
BookGenre(ISBN,Genre)
a) Find the ISBN of all Book with more than 100 Pages.
b) Find the ISBN of all Book with more than 100 Pages or are of Genre ‘Fiction’.
c) Find the ISBN of all Book with more than 100 Pages but are not of Genre ‘Fiction’.
d) Find the ISBN of all Book with more than 100 Pages and are of Genre ‘Fiction’ .
Answer: d)
Explanation: As per the syntax and semantics of Relational algebra.
5
Question 6
Consider the following relational schema:
ImageCode(ImageID, Name)
ImageBook(BookID, ImageID, Page)
What will be the Relational Algebra equivalent to the following statement?
“Find the names of all Images on Page 100.” Marks: 2 MCQ
Answer: d)
Explanation: As per the syntax and semantics of Relational Algebra.
6
Question 7
Consider the following tables:
S1
Student Roll
Aditi 1 S2
Mridul 8 Student Roll
Pritam 5 Shreya 2
Shreya 2 Mridul 8
Shreyan 6 Tina 9
Which of the following operations will return S1 itself? Marks: 2 MCQ
a) S2-(S2-S1)
b) S1-(S2-S1)
c) S1-(S1-S2)
d) S2-(S1-S2)
Answer: b)
Explanation: As per the syntax and semantics of set difference. S2-S1 will result in {Tina,
9} which when subtracted from S1, returns only the tuples in S1.
Hence, option b) is correct.
7
Question 8
Consider the following table:
UniversitiesDetails
StateName #CentralUniversities #StateUniversities #Faculties
Assam 2 18 15000
Bihar 4 18 18000
Delhi 7 11 20000
Gujarat 1 29 25000
Kerala 1 15 15000
West Bengal 1 36 40000
Identify the correct operation(s) which produces the following output from the above relation.
Marks: 2 MCQ
UniversitiesDetails
StateName #StateUniversities #Faculties
Delhi 11 20000
Gujarat 29 25000
West Bengal 36 40000
a) σ(#Faculties>=20000) (UniversitiesDetails)
b) σ(#Faculties>20000) (UniversitiesDetails)
Q
c) StateName,#StateUniversities,#Faculties σ(#Faculties>=20000) (UniversitiesDetails)
Q
d) StateName,#StateUniversities,#Faculties σ(#Faculties>20000) (UniversitiesDetails)
Answer: c)
Explanation: As per Relational Operators syntax and semantics, option c) is correct.
8
Question 9
Consider the following tables:
Details1
StateName #StateUniversities #Faculties
Delhi 11 20000
Gujarat 29 25000
West Bengal 36 40000
Details2
StateName #StateUniversities #Faculties
Delhi 11 20000
Tamil Nadu 22 26000
Uttarakhand 11 12000
Identify the correct operation(s) which will be produce the following output from the above
two relations. Marks: 2 MCQ
a) Details1 − Details2
b) Details2 − Details1
Answer: d)
Explanation: As per Relational Operators syntax and semantics, option d) is correct.
9
Question 10
Which of the following can be a candidate key for the following instance? Marks: 2 MCQ
UniversitiesDetails
StateName #CentralUniversities #StateUniversities #Faculties
Assam 2 18 15000
Bihar 4 18 18000
Delhi 7 11 20000
Gujarat 1 29 25000
Kerala 1 15 15000
West Bengal 1 36 40000
a) {StateName}
b) {#StateUniversities}
c) {#Faculties}
Answer: a)
Explanation: In the above instance, each row can be uniquely identified by using {StateName}
attribute only.
Hence, (a) is the correct option.
10