NPTEL Data Base Management System Week 3 Assignment Answers 2024 (July-October)

Week 3: Assignment 3 - Database Management System (DBMS) Description: This assignment covers various fundamental concepts in database manag...

Week 3: Assignment 3 - Database Management System (DBMS)

Description: This assignment covers various fundamental concepts in database management systems, including database recovery techniques, relational algebra, SQL queries, and Entity-Relationship Diagrams (ERD). Each question evaluates the understanding of these concepts through multiple-choice questions that require identifying the correct SQL queries, interpreting ER diagrams, and applying relational algebra.

NPTEL Data Base Management System Week 2 Assignment Answers 2024 (July-October)



Question 1:

Identify the case below in which a trigger is not preferred to use.

a) Loading data from a backup copy.
b) Maintaining summary data.
c) Replicating updates in a master-slave setup.
d) Enforcing database integrity.

Answer: a) Loading data from a backup copy.
Reason: Triggers are typically used for enforcing business rules, maintaining integrity, or automating repetitive tasks. Using a trigger during data loading from a backup can cause unwanted overhead and is generally not preferred.


Question 2:

Identify the correct Embedded SQL syntax for the following:

Find the names of all students whose marks are between 50 and 80 in each subject where total marks and each mark are declared in the host language.

a) EXEC SQL SELECT sname FROM students WHERE marks BETWEEN 50 AND 80;
b) EXEC SQL SELECT sname INTO :sname FROM students WHERE marks BETWEEN 50 AND 80;
c) EXEC SQL SELECT sname INTO :sname FROM students WHERE marks BETWEEN :lmark AND :umark;
d) EXEC SQL SELECT sname INTO :sname FROM students WHERE marks BETWEEN :lmark AND umark;

Answer: c) EXEC SQL SELECT sname INTO :sname FROM students WHERE marks BETWEEN :lmark AND :umark;
Reason: This syntax correctly uses placeholders for the lower and upper marks (:lmark and :umark), allowing the SQL statement to be embedded in a host programming language.


Question 3:

Consider the following Entity Relationship Diagram:

Song
SID
SName
Title
Key1
Key2
Key3
Music

Which of the following schema is equivalent to the entity Song?

a) Song(SID, SName, Key1, Key2, Key3, Music)
b) Song(SID, SName, Title, Key1, Key2, Key3, Music)
c) Song(SID, SName, Title, Music)
d) Song(SID, SName, Title, Key1, Music)

Answer: b) Song(SID, SName, Title, Key1, Key2, Key3, Music)
Reason: This option includes all attributes of the Song entity as shown in the ER diagram, making it the equivalent schema.


Question 4:

Consider the following instance of a relational PowerShop(Name, Location, Opensat, Closesat, Reviews):

NameLocationOpensatClosesatReviews
PowerGoodsArea10am8pm6
PowerFoodsPlace11am9pm8
PowerStationPark12pm10pm7

Suppose, you are interested in selecting all shop names that open after 10 am. The appropriate SQL query is:

sql
SELECT Name FROM PowerShop WHERE Opensat > '10am';

What will be the result?

a) PowerFoods, PowerStation
b) PowerGoods, PowerFoods, PowerStation
c) PowerFoods, PowerGoods
d) None of these

Answer: a) PowerFoods, PowerStation
Reason: The SQL query selects shops with opening times after 10 am. PowerFoods opens at 11 am, and PowerStation opens at 12 pm, both after 10 am.


Question 5:

Consider the following instance of the relation Garden(Name, Location, Species, Closenat, Opensat):

NameLocationSpeciesClosenatOpensat
PlantHouseCityAreaFlowers10pm7am
TreeHubCityParkTrees9pm6am
FlowerPlaceCityLaneFlowers8pm8am
TreeHouseCityBaseTrees9pm7am

What is the result of the following Relational Algebra:

sql
π(Name, Location)(σ(Species='Trees')(Garden))

a) PlantHouse
b) TreeHouse
c) TreeHub
d) TreeHub, TreeHouse

Answer: d) TreeHub, TreeHouse
Reason: The relational algebra query selects the Name and Location of gardens where the Species is Trees. TreeHub and TreeHouse satisfy this condition.


Question 6:

Consider the following Entity Relationship Diagram:

Singer
SID
SName
Lead
SID
Singer_name
Background
SID
Singer_name

Which of the following statements is (are) correct?

a) Participation of Singer in Lead is total.
b) Participation of Singer in Background is total.
c) Lead and Background entity sets are disjoint specializations of Singer entity set.
d) Lead and Background entity sets are overlapping specializations of Singer entity set.

Answer: c) Lead and Background entity sets are disjoint specializations of Singer entity set.
Reason: Since a singer can either lead or be in the background, these are disjoint specializations.


Question 7:

Consider the relation COURSE(CID, Name, Specialization):

CIDNameSpecialization
101DBMSData
102OSSystems
103AIIntelligence
104CloudNetworks

Which of the following Relational Algebra expressions produces exactly the same tuples as present in the instance of COURSE?

a) Ï€(CID, Name)(COURSE) ⨝ Ï€(CID, Specialization)(COURSE)
b) Ï€(CID, Name)(COURSE) ⨝ Ï€(CID, Specialization)(COURSE)
c) Ï€(CID, Specialization)(COURSE) ⨝ Ï€(CID, Name)(COURSE)
d) Ï€(CID, Specialization)(COURSE) ⨝ Ï€(CID, Name)(COURSE)

Answer: d) Ï€(CID, Specialization)(COURSE) ⨝ Ï€(CID, Name)(COURSE)
Reason: This operation joins the selected attributes from the COURSE relation and retrieves all tuples exactly as they are in the original COURSE table.


Question 8:

Consider the relation Tender(TNo, Price). Assume that there is a tuple (X, 20000) in the given relation. Identify the final value of x after the execution of the following loop:

sql
LOOP: X = 0; FOR I IN 1..1000 LOOP X := X + 2; END LOOP;

a) 20000
b) 2000
c) 200000
d) 2000

Answer: d) 2000
Reason: The loop iterates 1000 times, each time adding 2 to X, starting from 0. Thus, the final value of X will be 2000.

COMMENTS

Name

1sem,1,1st Sem,33,1st year,2,2 sem,1,2nd Sem,29,2sem,1,3rd Sem,40,4th sem,9,5th sem,28,6th sem,19,7th sem,8,8th sem,6,About BEU,1,ABOUT MAKAUT,1,aku civil Notes,15,Aku EE/EC Notes,14,aku ME Notes,14,aku notes,45,aku papers,11,aku syllabus,6,All Branch,2,all semester,19,B pharm,1,BAU Question Papers,1,BCA Notes,1,BEU Collage,12,BEU Model Paper Question,3,BEU Notes,10,BEU Organizer,31,BEU Previous Year Questions,2,Beu pyq,4,BEU PYQ Ans,5,BEU syllabus,8,Blogs,1,Btech results,1,Civil Branch,2,Civil Engineering,8,CS Engineering,8,CSE Branch,1,CSE Notes,19,Developing Soft Skills And Personality,13,EC Engineering,10,EE Branch,2,EE Engineering,9,engineering chemistry,5,Gate,1,internship,3,Introduction To Internet Of Things,21,Introduction To Machine Learning,2,iot,1,MAKAUT CE Organizer,6,MAKAUT CSE Organizer,5,MAKAUT ECE Organizer,3,MAKAUT EE Organizer,2,MAKAUT ME Organizer,4,MAKAUT Notes,5,MAKAUT Organizer,8,MAKAUT Question Paper,1,MAKAUT Syllabus,1,make money,6,ME Engineering,19,NPTEL,92,NPTEL COURSE,91,Programming Tutorial,12,Public Speaking,22,PYQ Solution,4,Question Bank,19,Soft Skills,33,Traffic & SEO,9,week 1,7,week 10,3,week 11,3,week 12,3,week 2,10,week 3,6,week 4,7,week 5,5,week 6,4,week 7,4,week 8,4,week 9,3,WEEK1,4,WEEK10,3,WEEK11,3,WEEK12,3,WEEK2,5,WEEK3,6,WEEK4,6,WEEK5,5,WEEK6,3,WEEK7,4,WEEK9,1,ztest,6,
ltr
item
BEU BIHAR : BEU PYQ , Beu previous year question All Courses All Semester Solutions: NPTEL Data Base Management System Week 3 Assignment Answers 2024 (July-October)
NPTEL Data Base Management System Week 3 Assignment Answers 2024 (July-October)
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCvvoIiENBRNCLmwpEz6ey1CAyBLErEz8yAfivwR5ONP-uZ8NlsHCxpjE-jfkKLIRUmWJm5NHDM0BXCUHhFwKGuMsrVrHsYILuGzTn3cfWodi1sjP55YLoY15-1yNdBpqGG62dYk3tl9YIsCg1KFzGY-YJHElPoERq35O2Ij8I1CAmrQT1cp6xS5NuBBbd/w437-h640/dr.webp
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCvvoIiENBRNCLmwpEz6ey1CAyBLErEz8yAfivwR5ONP-uZ8NlsHCxpjE-jfkKLIRUmWJm5NHDM0BXCUHhFwKGuMsrVrHsYILuGzTn3cfWodi1sjP55YLoY15-1yNdBpqGG62dYk3tl9YIsCg1KFzGY-YJHElPoERq35O2Ij8I1CAmrQT1cp6xS5NuBBbd/s72-w437-c-h640/dr.webp
BEU BIHAR : BEU PYQ , Beu previous year question All Courses All Semester Solutions
https://www.beubihar.org.in/2024/08/nptel-data-base-management-system-week.html
https://www.beubihar.org.in/
https://www.beubihar.org.in/
https://www.beubihar.org.in/2024/08/nptel-data-base-management-system-week.html
true
8161375692651428750
UTF-8
Loaded All Posts Not found any posts VIEW ALL Read More Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content
×