Nptel Database Management System Assignment 3 Answers

Are you looking for the Nptel Database Management System Assignment 2 Answers 2024 (July-Dec)? You’ve come to the right place! Our detailed and accurate solutions are designed to assist you in mastering the concepts of DBMS, including SQL queries, database design, normalization, and more.

Course Link: Click Here


Nptel Database Management System Assignment 3 Answers
Nptel Database Management System Assignment 3 Answers

Nptel Database Management System Assignment 3 Answers (July-Dec 2024)


Q1. Identify the cases below in which a trigger is not preferred to use.
a) Loading data from a backup copy.
b) Maintaining summary data.
c) Replicating updates at a remote site.
d) Enforcing database integrity.

Answer:


Q2. Identify the correct Embedded SQL queries for the following:
Find the names of all students whose marks are between min marks and max marks
where min_marks and max marks are declared in the host language.

a) EXEC SQL
DECLARE C CURSOR FOR
SELECT name
FROM students
WHERE marks BETWEEN: min_marks AND max_marks
END_EXEC


b) EXEC SQL
DECLARE C CURSOR FOR
SELECT name
FROM students
WHERE : marks BETWEEN min_marks AND max_marks
END_EXEC


c) EXEC SQL
DECLARE C CURSOR FOR
SELECT name
FROM students
WHERE marks > min_marks AND marks < : max_marks
END_EXEC


d) EXEC SQL
DECLARE C CURSOR FOR
SELECT name
FROM students
WHERE marks BETWEEN min_marks AND max_marks
END_EXEC

a
b
c
d

Answer:


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


Q3.Consider the following Entity Relationship Diagram:

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, Title, SName, Key1, Key2, Key3, Music)
d) Song (SID, SName, Title, Music)

Answer:


Q4. Consider the following instance of the relation FlowerShop (Name, Location, OpensAt, ClosesAt, KnownFor)

a) X=Name, Y=Location, M=Location, N=KnownFor
b) X=Name, Y=Location, M=Name, N=KnownFor
c) X=Name, Y=KnownFor, M=Location, N=KnownFor
d) X=Name, Y=KnownFor, M=Name, N=Location

Answer:


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


Q5. Consider the following scenario:
An Environmental resource management company keeps record of different forests, identified by their names. A forest is associated with its location that contains the country and area in which the forest is present. In each forest, there are different types of trees that are also recorded by the company.
Which of the following schema correctly represents the Forest entity set?

a) Forest (Name, Location, Trees)
b) Forest (Name, Location, Country, Area, Trees)
c) Forest (Name, Location), Forest location (Location, Country, Area)
d) Forest (Name, Country, Area), Forest_trees (Name, Trees)

Answer:


Q6. Consider the following instance of the relation Gardens (Name, Location, OpensAt, ClosesAt, KnownFor)

What is the result of the following Tuple Relational Calculus?
{tape Gardens (t [KnownFor] =p [KnownFor] p [Location]=’Mumbai’)}

Answer:


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


Q7.Consider the following Entity Relationship Diagram:

Which of the following statements is (are) correct?
a) Participation of Song in R1 is total.
b) Participation of Singer in R1 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:


Q8. An entity in CUSTOMER entity set is associated with at most one entity in LOAN set. An entity in LOAN, however, can be associated with any number (zero or more) of entities in CUSTOMER. What is the cardinality of the relation between LOAN and CUSTOMER?
a) One-to-many
b) One-to-one
c) Many-to-many
d) Many-to-one

Answer:


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers

See also  Data Base Management System | Week 5

Q9.Consider the instance of the relational schema DOCTORS (DrID, Name, Specialization):

Which of the following Relational Algebra expressions produce(s) exactly the same tuples as present in this instance of DOCTORS?
a) IDrID, Name (DOCTORS) IDrID, Specialization (DOCTORS)
b) IDrID, Name (DOCTORS) IName, Specialization (DOCTORS)
c) IIDrID, Specialization (DOCTORS) IIDrID, Specialization (DOCTORS)
d) IIDrID, Specialization, Name (DOCTORS) Ispecialization (DOCTORS)

Answer:


Q10. Consider the relation Tender (Tno, Price). Assume that there is a tuple (2, 20000) in the given relation. Identify the final value of n after the execution of the following loop:
DECLARE
n NUMBER:= 0;
BEGIN
FOR r IN 1..5 LOOP
SELECT Price INTO n FROM Tender WHERE Tno=2;
n:= n+(r*2);
END LOOP;
END;
a) 20000
b) 20010
c) 20030
d) 100030

Answer:


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


All Weeks of Database Management System: Click here

For answers to additional Nptel courses, please refer to this link: Check here

Nptel Database Management System Assignment 3 Answers (JAN-APR 2024)

Course Name: Data Base Management System

Course Link: Click Here

For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


Q1. Consider the following instances:
Consider the Relational Algebra on these given instances:
IIName, Branch, Capacity (University)÷(IIBranch, Capacity (@Fees<=200000 University) n IIBranch, Capacity (@Capacity 2000 University))
What is the output of the Relational Algebra?
a) JFTT.
b) KSSL.
c) LKUniversity.
d) No row will be selected.

Answer: a) JFTT.


Q2. Consider the following instances:
How many tuples are returned by the following Relational Algebra?
IIDips.Name(Dips n (Dips <>(@Dips1.Rating <5V Dips1.Price<=80(PDips1 (Dips)))))

a) 1
b) 2
c) 3
d) 4

Answer: a) 1


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


Q3. Consider the relational schema Sensor (SensorID, Battery, BaseStationID, Range). Choose the correct Tuple Relational Calculus that represents the following statement “Display all the SensorIDs associated with BaseStationID BS1.”
a) {s|t < t [BaseStationID]=^BS1′>}
b) {|3s € Sensor (p[BaseStationID]=^BS1′) }
c) {t|3s € Sensor (t [SensorID]=s [BaseStationID] ^ t [BaseStationID]=’BS1′)}
d) {t|3s € Sensor (t [SensorID]=s [SensorID] ^ s [BaseStationID]=’BS1′) }

Answer: d) {t|3s € Sensor (t [SensorID]=s [SensorID] ^ s [BaseStationID]=’BS1′) }


Q4. Consider the relational schema Sensor (SensorID, Battery, BaseStationID, Range). Choose the correct Domain Relational Calculus equivalent to the following SQL query
SELECT Range FROM Sensor WHERE Battery=’500′

a) {sl3c, d, i (c, d, i, s € Sensor ^ Battery=’500′)}
b) {<s>13c, d, i (<c, d, i, s› € Sensor A d=’500′)}
c) {<s>|]c, d, i (<c, d, i> € s A Battery=’500′)}
d) {sl3<c, d, i> (c, d, i, s E Sensor ^ d=’500′)}

Answer: b) {<s>13c, d, i (<c, d, i, s› € Sensor A d=’500′)}


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


Q5. A C program, with embedded SQL query allows the users to enter their Year of Birth and Country which are stored in variables yob and cou respectively. The SQL command returns the counts of those all other people born in the same year and country from Person(id, Birth, Country).
Which of the following SQL queries is correct for the purpose?

a) EXEC SQL
DECLARE C CURSOR AS SELECT id
FROM Person
WHERE Birth==yob AND Country==cou
END_EXEC
b) EXEC SQL
DECLARE C CURSOR FOR
SELECT count(id)
FROM Person
WHERE :Birth: yob & Country=:cou
END_EXEC
c) EXEC SQL
DECLARE C CURSOR AS
SELECT id
FROM Person
WHERE :Birth==yob & Country==cou
END_EXEC
d) EXEC SQL
DECLARE C CURSOR FOR
SELECT count(id)
FROM Person
WHERE Birth: yob AND Country=:cou
END_EXEC

Answer: d


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


Q6. A company maintains a schema of Reports where each report is identified by a Heading. The reports are also associated with corresponding a Date and Length. Moreover, each report can be written by multiple Authors. Which of the following schema correctly represents the Reports entity set?
a) Reports(Heading, Date, Length, Authors)
b) Reports(Heading, Date, Length), Reports1 (Heading, Authors)
c) Reports (Heading, Date, Length), Reports1 (Heading, Authors)
d) Reports(Heading, Date, Length), Reports1 (Heading, Authors)

See also  Nptel Database Management System Assignment 6 Answers

Answer: d) Reports(Heading, Date, Length), Reports1 (Heading, Authors)


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


Q7. Consider the Entity Relationship Diagram
Which of the following is true?

a) The schema for the Device entity will be Device (Model_ID, Color) and DeviceSensor (Model_ID, SensorName).
b) The schema for the Dev_Owner will be Dev_Owner (Model_ID, OID).
c) The schema for the Owner will be Owner (OID, Model ID, Name, Address).
d) The schema for the Device entity will be Device (Model_ID) and DeviceSensor (SensorName, Color).

Answer: b) The schema for the Dev_Owner will be Dev_Owner (Model_ID, OID).


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


Q8. Consider the Entity Relationship Diagram
Which of the following is true?

a) Participation of College in University is total.
b) Participation of College in Enrolled is total.
c) Participation of Student in University is partial.
d) Participation of Uni_Stu in Student is partial.

Answer: b) Participation of College in Enrolled is total.


For answers or latest updates join our telegram channel: Click here to join


Q9. Consider the Entity Relationship Diagram
Which of the following is false?

a) The schema of University is University (UName, Area, Location).
b) The schema of University is University (UName, Area, Location, Departments, Employees).
c) The schema of Technical is Technical (UName, Departments, Employees).
d) The schema of Technical are Technicali (UName, Departments) and Technical2(UName, Employees).

Answer: b), d)


For answers or latest updates join our telegram channel: Click here to join

These are Nptel Database Management System Assignment 3 Answers


Q10. An organization, collecting car renters information, considers the following relations: Renter (Renter_ID, Contact)
Renting(Renter_ID, Car Number)
Car (Car Number, Model).
What will the following relational algebra expression return to the organization? ICar Number (Car) – Car-Number (Renter Renting)

a) The Car Number of those Cars that are rented by at most one Renter.
b) The Car_Number of those Cars that are rented by at least one Renter.
c) The Car Number of those Cars that are rented by all Renters.
d) The Car Number of those Cars that are not rented by any Renter.

Answer: d) The Car Number of those Cars that are not rented by any Renter.


For answers or latest updates join our telegram channel: Click here to join

More Solutions of DataBase Management System: Click Here

More NPTEL Solutions: Click Here


Nptel Database Management System Week 3 Assignment Answers (July-Dec 2023)

Course Name: Data Base Management System

Course Link: Click Here

These are Nptel Database Management System Week 3 Assignment Answers


Q1. Consider the following instance of the relation MovieBooking (MovieName, TheatrID, HallNo, Glasses 3D, MLanguage, Showtime ID, ShowDay)

image 4

Which of the following MovieNames are produced by the Relational Algebra expression given below?
IlMovieName (HallNo>2^MLanguage English’ (MovieBooking))
IlMovie Name (Glasses3D-‘Yes’ (MovieBooking))

a) The Martian
b) Interstellar
c) Gravity
d) Inception

Answer: b, d


These are Nptel Database Management System Week 3 Assignment Answers


Q2. Consider the relation Employee (EID, Dept, Experience, Salary). What is the Tuple Relational Calculus expression equivalent to the statement “Select those Employee IDs (EID) whose Experiences are more than 10 years “?
a) {13 p,t Employee (t [Salary] =p [Dept] v p [Experience] =10)}
b) {t13p = Employee (t [EID] =p [EID] ^ p [Experience] >10)}
c) {t13 p,t Employee (t [Salary] =p [EID] ^ p [EID]>10)}
d) {13p = Employee (t [EID] =p [EID] ^ p [Employee] >10)}

Answer: b) {t13p = Employee (t [EID] =p [EID] ^ p [Experience] >10)}


These are Nptel Database Management System Week 3 Assignment Answers


Q3. Consider the following Entity Relationship Diagram :

image 5

If n [Payment] is the number of attributes present in the relational schema of Payment, n[In_Cash] is the number of attributes present in the relational schema of In-Cash and n[In Cheque] is the number of attributes present in the relational schema of In_Cheque, which of the following options can NOT be true?
a) n[Payment] = 6
b) n[In Cheque] = 6
c) n[In_Cash] = 4
d) n[In_Cheque] = 3

See also  Nptel Database Management System Assignment 2 Answers

Answer: a, d


These are Nptel Database Management System Week 3 Assignment Answers


Q4. Consider the Entity Relationship diagram:

image 6

Which attribute will not be present in the schema of ManagedBy?
a) cnumber
b) id
c) experience
d) Enrolment

Answer: c) experience


These are Nptel Database Management System Week 3 Assignment Answers


Q5. In a company, the Building relation maintains information about the BuildingLocation, BuildingFloors, BuildingType and BuildingColor. What will be the Domain Relational Calculus expression to obtain the Building Locations of those Buildings whose BuildingColor is “Gray”?
a) {plan,t,c ( € Building ^c=”Gray”)}
b) {plan,t,c (n,t,c € Building ^c=”Gray”) }
c) {n,t,c (p,n,t,c € Building V c=”Gray”)}
d) {ln,t,c ( € Building ^ c=”Gray”)}

Answer: d) {ln,t,c ( € Building ^ c=”Gray”)}


Q6. Consider the Entity Relationship diagram : Which of the following statement (s) is/are TRUE?

image 7

a) DOGS inherit the attributes of CARNIVORES but not of ANIMALS.
b) DOGS inherit the attributes of CARNIVORES and ANIMALS.
c) CARNIVORES inherit the attributes of DOGS but not of OMNIVORES.
d) ANIMALS inherit the attributes of CARNIVORES, OMNIVORES, HERBIVORES and DOGS.

Answer: c) CARNIVORES inherit the attributes of DOGS but not of OMNIVORES.


These are Nptel Database Management System Week 3 Assignment Answers


Q7. In a company, a Handicraft is made by multiple Artisans and an Artisan makes multiple Handicrafts. The Handicrafts are identified by their unique Tags. A Handicraft is made of a particular Material and is multi- Colored. An Artisan has a unique ID. Assuming there is a Creates relation between Handicraft and Artisan, what will be the correct schema for Creates and Handicraft?
a) Creates (Tag, ID)
Handicraft (Tag, Material, Color)
b) Creates (ID)
Handicraft (Tag Material)
Handicraft_color (Tag, Color)
c) Creates (Tag, ID, Color)
Handicraft (Tag, Material)
d) Creates (Tag, ID)
Handicraft (Tag, Material)
Handicraft_color (Tag, Color)

Answer: d) Creates (Tag, ID)
Handicraft (Tag, Material)
Handicraft_color (Tag, Color)


These are Nptel Database Management System Week 3 Assignment Answers


Q8. Consider 2 instances:

image 8

Which PageNumber is not produced by the following Relational Algebra?
((IIpageNumber, Topic (Chapter) – Paragraph) x Paragraph) IIchapter.PageNumber
a) 11
b) 40
c) 20
d) 33

Answer: a) 11


These are Nptel Database Management System Week 3 Assignment Answers


Q9. Consider the relation GROCERY (ITEM, PRICE, MONTH). Select the SQL query from within a host language, to find those ITEMS whose PRICE has exceeded the price stored in monthly budget in a specific MONTH defined in target_month. monthly budget and target-month are declared in host language.

a) EXEC SQL
DECLARE C CURSOR FOR
SELECT ITEM
FROM GROCERY
WHERE PRICE > monthly_budget AND MONTH= target_month
END_EXEC
b) EXEC SQL
DECLARE C CURSOR FOR
SELECT GROCERY
FROM GROCERY
WHERE PRICE > monthly_budget AND MONTH= : target_month
END_EXEC
c) EXEC SQL
DECLARE C CURSOR FOR
SELECT ITEM
FROM GROCERY
WHERE PRICE >: monthly_budget
END_EXEC
d) EXEC SQL
DECLARE C CURSOR
FOR SELECT ITEM
FROM PRODUCT
WHERE PRICE >: monthly_budget AND MONTH= : target_month
END EXEC

Answer: d) EXEC SQL
DECLARE C CURSOR
FOR SELECT ITEM
FROM PRODUCT
WHERE PRICE >: monthly_budget AND MONTH= : target_month
END EXEC


These are Nptel Database Management System Week 3 Assignment Answers


Q10. Consider the following instance of a relation Uniform :

image 9

How many tuples will be returned by the following Relational Algebra Query? Uniform) ÷ Ilcolor (Color=’Blue Uniform)) U ((School=’KidSys’vColor=’Blue IISchool (Color White/Uniform)
a) 1
b) 2
c) 3
d) 4

Answer: b) 2


These are Nptel Database Management System Week 3 Assignment Answers

More Solutions of Data Base Management System: Click Here