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

DBMS Solution-1

DBMS SOLUTION

Uploaded by

v vv
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)
37 views

DBMS Solution-1

DBMS SOLUTION

Uploaded by

v vv
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/ 10

Database Management System: Assignment 1

Total Marks : 20

December 21, 2022

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

b) paper id, corresponding Author

c) conference id, corresponding Author

d) paper id, conference 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

a) Project(pCode, pName) is an instance of a relation schema.

b) Project(pCode, pName) is an example of a physical schema.

c) (2245, HardFort) is an instance of a relation schema.

d) (2245, HardFort) is an example of a logical schema.

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)

What does the following relational algebra expression represent?


ΠISBN ((σPages>100 Book) 1 (σGenre=‘F iction0 BookGenre))
Marks: 2 MCQ

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

a) σName (ImageCode 1 σPage=100 (ImageBook))

b) σName (ΠPage=100(ImageCode) 1 ImageBook)

c) ΠName (ΠPage=100 (ImageCode) 1 ImageBook)

d) ΠName (ImageCode 1 σPage=100 (ImageBook))

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

StateName #StateUniversities #Faculties


Gujarat 29 25000
West Bengal 36 40000
Tamil Nadu 22 26000
Uttarakhand 11 12000

a) Details1 − Details2

b) Details2 − Details1

c) (Details1 ∪ Details2 ) ∩ (Details1 ∩ Details2 )

d) (Details1 − Details2 ) ∪ (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}

d) {StateName, #CentralUniversities, #StateUniversities}

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

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