[go: up one dir, main page]

0% found this document useful (0 votes)
50 views62 pages

Introduction To Database Mca

The document outlines the Week 12 assignment for the 'Introduction to Database Systems' course, focusing on the Two Phase Locking (2PL) protocol and various recovery methods in database systems. It includes questions regarding the correctness of statements about 2PL, logging methods, and transaction schedules, with specific due dates for submissions. Additionally, it provides a series of questions related to database operations, with accepted answers and scoring details.

Uploaded by

defenceguy239
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)
50 views62 pages

Introduction To Database Mca

The document outlines the Week 12 assignment for the 'Introduction to Database Systems' course, focusing on the Two Phase Locking (2PL) protocol and various recovery methods in database systems. It includes questions regarding the correctness of statements about 2PL, logging methods, and transaction schedules, with specific due dates for submissions. Additionally, it provides a series of questions related to database operations, with accepted answers and scoring details.

Uploaded by

defenceguy239
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/ 62

4/22/25, 7:32 PM Introduction to Database Systems - - Unit 15 - Week 12

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 12 : Assignment 12
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-04-16, 23:59 IST.


As per our records you have not submitted this assignment.
registered, click
to check your
State whether the statements given in questions 1-4 are True or False about Two Phase Locking
payment status
(2PL) protocol

1) If all transactions follow 2PL protocol, the resulting schedules will always be serial 0.5 points
schedules
Course
outline True
False
About NPTEL
No, the answer is incorrect.
() Score: 0
Accepted Answers:
Introduction False
to Database
Systems () 2) If all transactions follow 2PL protocol, the transaction that issues the first lock 0.5 points
request in the schedule must also issue the first unlock request
Week 0 ()
True
Week 1 () False

No, the answer is incorrect.


Week 2 () Score: 0
Accepted Answers:
Week 3 () False

Week 4 () 3) If all transactions follow 2PL protocol, deadlocks can be avoided 0.5 points

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=99&assessment=188 1/4
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 15 - Week 12

Week 5 () True
False
Week 6 () No, the answer is incorrect.
Score: 0
Week 7 () Accepted Answers:
False
Week 8 ()
4) If all transactions follow 2PL protocol, the transaction that issues the first lock 0.5 points
request on a data item X must issue the first unlock request on X
Week 9 ()
True
Week 10 () False

Week 11 () No, the answer is incorrect.


Score: 0
Accepted Answers:
Week 12 () True

Concurrency
control using Use the following information to answer questions 5-7. The following sequence of log
Locks (unit? records written by two transactions T and U are found on the log upon system restart
unit=99&lesson
after a crash: (Before recovery manager starts operating)
=100)
<Start T>; <T, A, 10>; <Start U>; <U, B, 20>; <T, A, 30>; <U, B, 40>; <Commit U>;
Recovery using
5) Assuming that the recovery manager uses UNDO logging method, the value of B on 2 points
undo logging
method (unit? disk immediately after restart, but before the recovery manager is activated, is:
unit=99&lesson
=101)
20
40
Recovery using
Redo and
can’t be determined
Undo-Redo 10
logging
No, the answer is incorrect.
methods (unit?
Score: 0
unit=99&lesson
Accepted Answers:
=102)
can’t be determined
Recoverable
schdeules and 6) Again, assuming that the recovery manager uses UNDO logging method, consider 2 points
transaction the following set of commands issued by the recovery manager.
isolation levels
(unit?
Cmd1: Restore A to 30
unit=99&lesson
Cmd2: Restore A to 10
=103)

Week 12 Which of the following statements is true as per the logging method?
Feedback form
: Introduction to Cmd1 always precedes Cmd2
Database
Cmd1 is optional
Systems (unit?
unit=99&lesson Cmd1 and Cmd2 are optional
=104) Cmd2 always precedes Cmd1

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=99&assessment=188 2/4
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 15 - Week 12

No, the answer is incorrect.


Quiz: Week 12
Score: 0
: Assignment
Accepted Answers:
12
Cmd1 always precedes Cmd2
(assessment?
name=188) 7) Assuming that the recovery manager uses REDO logging method, the value of B on 2 points
disk immediately after restart but before the recovery manager is activated.
Download
Videos () may be 20
must be 20
Lecture
Notes () may be 40
must be 40
Problem No, the answer is incorrect.
Solving Score: 0
Session - Jan Accepted Answers:
2025 () may be 40

8) In a particular database system, it is estimated that on an average (across many 2 points


system crashes), the number of committed transactions is almost 5 times the number of
uncommitted transactions in the log at the time of restart after the crash.. In which of the following
logging mechanisms the recovery manager attends to the least number of transactions, after being
given control after a crash?

REDO
UNDO
UNDO-REDO
Any of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
UNDO

9) Consider the following sets about system recovery after a crash 2 points

{1: UNDO; 2: REDO; 3: UNDO-REDO}


{p: Ignore committed transactions; q: Consider committed transactions; r: Ignore
committed and incomplete transactions; s: Consider committed and incomplete transactions; t: Write
ahead log }

Identify the correct matching between the sets:

1--p; 2--q; 3--r


1--t; 2--q; 3--s
1--p; 2--q; 3--t
1--p; 2--t; 3--s

No, the answer is incorrect.

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=99&assessment=188 3/4
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 15 - Week 12

Score: 0
Accepted Answers:
1--p; 2--t; 3--s

10) Consider the following schedule S. 2 points

S: r1 (x); r2 (z); r1 (z); r3 (x); r3 (y); w1 (x); c1 ; w3 (y); c3 ; r2 (y); w2 (z); w2 (y); c2

Here ri (a) denotes transaction i reads item a, wi (a) denotes transaction i writes data item a,
ci denotes that transaction i is committed. The transaction S is

cascadeless and strict


cascadeless and not strict
not strict; cascadeless is irrelevant
not cascadeless and not strict

No, the answer is incorrect.


Score: 0
Accepted Answers:
cascadeless and strict

11) Consider the following schedule S. 2 points

S: r1 (x); r2 (z); r1 (z); r3 (x); r3 (y); w1 (x); w3 (y); r2 (y); w2 (z); w2 (y);

Here ri (a) denotes transaction i reads item a and wi (a) denotes transaction i writes data item a. The
commit operations of the transactions can be added at the end of S in an appropriate order such
that S is recoverable. The number of such orders is

1
2
3
4

No, the answer is incorrect.


Score: 0
Accepted Answers:
3

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=99&assessment=188 4/4
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 14 - Week 11

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 11 : Assignment 11
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-04-09, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-04-04, 15:10 IST
payment status
1) Consider the following two relations that store the details of the employees, their 2 points
departments, and managers of the departments working in an organization, where managerId is a
foreign key that refers to empId of Employee relation.
Course
outline Employee(​empId,​deptId) Department(​deptId​, deptName, managerId)

Consider a join operation between the above two relations based on the join condition
About NPTEL
Employee.empId = Department.managerId ​.
()
Assume that indexes are available on both the relations on the fields used in the join condition.
Suppose that the single loop join technique is chosen to perform the operation. Identify the correct
Introduction
option for the following statements:
to Database
Systems ()
S1. For the given join condition, the join selection factor of Department relation is more
Week 0 () than the join selection factor of Employee relation
S2. For achieving better performance, the single loop join algorithm loops over the
Employee records
Week 1 ()

Both S1 and S2 are False


Week 2 ()
S1 is False, S2 is True

Week 3 () S1 is True, S2 is False


Both S1 and S2 are True
Week 4 ()

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=91&assessment=187 1/5
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 14 - Week 11

No, the answer is incorrect.


Week 5 () Score: 0
Accepted Answers:
Week 6 () S1 is True, S2 is False

2) Consider two files R and S stored on the disk using b1 and b2 blocks, respectively. 2 points
Week 7 ()
The files are sufficiently large that they don’t fit into main memory. Assume that the equi-join
operation R ⨝ R.A = S.B S is to be performed using partition-hash join method.Main memory space
Week 8 ()
that can fit M blocks of data is available for the partition phase. The number of block accesses in
partition phase is
Week 9 ()
b1 + b2
Week 10 ()
2 (b1 + b2)
b1 + b2 + 2M
Week 11 ()
2 (b1 + b2 + M)
Join operator
Yes, the answer is correct.
processing Score: 2
algorithms
Accepted Answers:
(unit?
2 (b1 + b2)
unit=91&lesson
=92)
3) For the information given in Question 2, assume that each of the partitions in R and S 2 points
Query is stored in 10000 and 1000 blocks, respectively. To compute the join result of a particular partition
optimization file ​of R, the number of blocks of S that need to be accessed in the probe phase is (Ignore the time
(unit?
taken to write the result)
unit=91&lesson
=93) 1000
ACID 11000
properties and
1000 * b2
operations in
transactions
2000 * b2
(unit? Yes, the answer is correct.
unit=91&lesson Score: 2
=94) Accepted Answers:
1000
Schdeules
(unit?
unit=91&lesson 4) Consider two files R and S stored on a disk using 9000 and 1000 blocks, respectively. 2 points
=95) Assume that R is already sorted on A. Suppose that the equi-join operation R ⨝ R.A = S.B S is to be
performed using sort-merge join. Main memory that can fit 11 blocks of data is available as the
Lecture Slides
buffer space for performing external sorting. The number of block accesses required to perform the
(unit?
join operation (without counting the cost of writing the join results) is
unit=91&lesson
=96)
10000
Week 11 16000
Feedback form
18000
: Introduction to
Database 64000
Systems (unit?
Yes, the answer is correct.
unit=91&lesson
=97)

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=91&assessment=187 2/5
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 14 - Week 11

Score: 2
Quiz: Week 11
: Assignment Accepted Answers:
11 16000
(assessment?
5) Which of the following SQL operators isn’t commutative? 2 points
name=187)
INNER JOIN
Week 12 ()
FULL OUTER JOIN

Download LEFT OUTER JOIN


Videos () INTERSECT

Yes, the answer is correct.


Lecture Score: 2
Notes () Accepted Answers:
LEFT OUTER JOIN
Problem
Solving 6) Use the following schema of the academic institution relational database for this 2 points
Session - Jan question.
2025 ()
student(​rollNo​, name, degree, year, sex, deptNo, advisor)
department(​deptId​, name, hod, phone)
professor(​empId​, name, sex, startYear, deptNo, phone)
deptNo is a foreign key in the ​student and ​professor relations referring to deptId of
department ​relation; advisor ​is a foreign key in the ​student ​relation referring to empID ​of ​
professor ​relation;

Consider the following SQL query:


Select s.rollNo, s.name From student s, professor p
Where s.deptNo = 3 and p.deptNo <> 3 and s.advisor = p.empId

The above SQL query is converted into an equivalent optimized RA expression using heuristic
optimization rules taught in the class. In the final RA expression, let A and B be the sets of columns
projected from student and professor respectively after appropriate selection operations. The sizes
of the sets A and B, respectively, are

1, 1
2, 2
3, 1
4, 2

Yes, the answer is correct.


Score: 2
Accepted Answers:
3, 1

7) Consider the following schedule S. 2 points

S: R1 (X); R2 (Z); R1 (Z); R3 (X); R3 (Y); W1 (X); W3 (Y); R2 (Y); W2 (Z);

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=91&assessment=187 3/5
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 14 - Week 11

In the precedence graph of S, the number of edges (both incoming and outgoing) of
nodes T1 and T2, respectively are

1, 1
1, 2
2, 1
2, 2

No, the answer is incorrect.


Score: 0
Accepted Answers:
2, 2

8) Which of the following serializations of transactions results in a schedule that is 2 points


conflict equivalent to the schedule given in question 7?

T1, T2, T3
T3, T2, T1
T1, T3, T2
T3,T1, T2

No, the answer is incorrect.


Score: 0
Accepted Answers:
T3,T1, T2

9) Consider the following schedules. 2 points

S1: R1 (X) R1 (Y) R2 (X) R2 (Y) W2 (Y) W1 (X)


S2: R1 (X) R2 (X) R2 (Y) W2 (Y) R1 (Y) W1 (X)

Which of the above schedules are conflict-serializable?

Only S1
Only S2
BOTH
NONE

No, the answer is incorrect.


Score: 0
Accepted Answers:
Only S2

10) The acyclicity of the precedence graph of a schedule gives only a necessary 0.5 points
condition, but not a sufficient condition to test conflict serializability

True
False

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=91&assessment=187 4/5
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 14 - Week 11

No, the answer is incorrect.


Score: 0
Accepted Answers:
False

11) There exists a schedule that is view serializable but not conflict serializable 0.5 points

True
False

Yes, the answer is correct.


Score: 0.5
Accepted Answers:
True

12) A conflict serializable schedule is conflict-equivalent to exactly one serial schedule 0.5 points

True
False

No, the answer is incorrect.


Score: 0
Accepted Answers:
False

13) The operations that belong to the same transaction can never conflict 0.5 points

True
False
No, the answer is incorrect.
Score: 0
Accepted Answers:
True

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=91&assessment=187 5/5
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 13 - Week 10

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 10 : Assignment 10
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-04-02, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-03-26, 07:33 IST
payment status
1) Consider a B+ tree in which the maximum number of keys in an internal node is 5. What is 1 point
the minimum number of keys in any non-root internal node?

1
Course
outline 2
3
About NPTEL 4
() Yes, the answer is correct.
Score: 1
Introduction to Accepted Answers:
Database 2
Systems ()
2) 1 point
Week 0 ()

Week 1 ()

Week 2 ()

Week 3 ()

Week 4 ()

Week 5 ()

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=84&assessment=186 1/4
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 13 - Week 10

Week 6 ()
For the B+ tree given above, the minimum number of ​nodes of the tree (including the root ​node ​
) that must be fetched in order to obtain result of the following query: “Get all records with a search key
Week 7 ()
greater than or equal to 14 and less than or equal to 20” is

Week 8 () 4
5
Week 9 ()
6

Week 10 () 7

Yes, the answer is correct.


B+ trees on Score: 1
Disks (unit? Accepted Answers:
unit=84&lesson= 4
85)
3) Consider the B+ tree given in Question 2 with order = 3 and orderleaf = 2. If we insert the 1 point
Performance
element 15, the number of internal nodes and leaf nodes in the resulting tree, respectively, are
and Reliability of
Multiple Disks
4, 6
(unit?
unit=84&lesson= 4, 7
86) 5, 6

Relational Query 5, 7
Evaluation (unit? Yes, the answer is correct.
unit=84&lesson= Score: 1
87) Accepted Answers:
4, 7
Lecture Slides
(unit?
unit=84&lesson= 4) The details of a RAID-4 (Block-level striping; dedicated parity disk) storage system are as 1 point
88) follows: Number of data disks = 6; Number of parity disks = 1. Assume that the disks have a lot of empty
space. Suppose, RAID-5 (Block-level striping; distributed parity;) is used, instead of RAID-4, to
Week 10
implement the above storage system, the number of disks on which data is stored is
Feedback form :
Introduction to
7
Database
Systems (unit? 8
unit=84&lesson= 13
90)
14
Quiz: Week 10 :
Yes, the answer is correct.
Assignment 10 Score: 1
(assessment?
Accepted Answers:
name=186) 7

Week 11 ()
5) To store huge data, the implementation of which of the following RAID level requires the 1 point
largest number of disks
Week 12 ()
RAID-6 (Block-level striping; double distributed parity;)
Download
RAID-4 (Block-level striping; dedicated parity disk)
Videos ()
RAID-2 (Bit-level striping; Redundancy using Hamming codes)
Lecture Notes RAID-1 (Mirrored disks; No parity; No data striping)
()

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=84&assessment=186 2/4
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 13 - Week 10

Yes, the answer is correct.


Problem Score: 1
Solving Accepted Answers:
Session - Jan RAID-1 (Mirrored disks; No parity; No data striping)
2025 ()
Use the following information to answer questions 6 and 7. A file is stored on a disk in 2048 blocks. For
this file, we need to perform external sorting in the main memory with buffer size equal to 9 blocks.

6) The number of block accesses during sort phase is 1 point

18
228
2048
4096

Yes, the answer is correct.


Score: 1
Accepted Answers:
4096

7) The number of block accesses during merge phase is 1 point

228
8192
12288
16384

Yes, the answer is correct.


Score: 1
Accepted Answers:
12288

8) The following relation is used to store the details of the students studying in an engineering 1 point
college: Student(rollNo, name, sex).
Consider the following predicates.

P1: rollNo= ‘CS17B038’


P2: name= ‘Suresh’ (Assume that there are at least two people in the college with name
‘Suresh’)
P3: sex = ‘Male’

Let c1, c2 and c3 denote the selectivity of P1, P2 and P3, respectively. Under normal conditions,
the relation among c1, c2 and c3 is

c1 < c2 < c3
c1 < c2 > c3
c1 < c2 = c3
c3 < c2 < c1

Yes, the answer is correct.

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=84&assessment=186 3/4
4/22/25, 7:32 PM Introduction to Database Systems - - Unit 13 - Week 10

Score: 1
Accepted Answers:
c1 < c2 < c3

9) Consider two data files R and S with ​b1 and ​b2 blocks stored on two disks with half 1 point
blocks on each disk to support parallel access. To perform Nested loop join on the two files using the
algorithm given below, ​m memory buffers are available (assume that ​m is an odd number). Two buffers
are used for the inner file (one block from each disk), one for the result and the rest of the buffers are
equally divided for the outer file from both the disks. Let the time taken to access a block be ​t ​.
for each record x,y in R do // x is from disk 1 and y is from disk 2
for each record u,v in S do // u is from disk 1 and v is from disk 2
check if x, u join .. .
check if x, v join .. .
check if y, u join .. .
check if y, v join .. .

The number of times all the blocks of the inner file are accessed is

ceil( b1 / (m - 3) )
ceil( b1 / (2 * (m - 3)) )
ceil( b1 / (4 * (m - 3)) )
ceil( b1 / (2 * (m - 2)) )

Yes, the answer is correct.


Score: 1
Accepted Answers:
ceil( b1 / (m - 3) )

10) Using the information in Question 9, the total amount of time taken for the nested loop join 1 point
operation, excluding the time taken to write the result, is

( (b1 / 2) + ceil( b1 / (m-3) ) * (b2 / 2) ) * t


( (b1 / 2) + ceil( b1 / (2 * (m-3)) ) * (b2 / 2) ) * t
( (b1) + ceil( b1 / (m-3) ) * b2 ) * t
( (b1 / 2) + ceil( b1 / (m-3) ) * b2 ) * t

Yes, the answer is correct.


Score: 1
Accepted Answers:
( (b1 / 2) + ceil( b1 / (m-3) ) * (b2 / 2) ) * t

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=84&assessment=186 4/4
4/22/25, 7:31 PM Introduction to Database Systems - - Unit 12 - Week 9

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 9: Assignment 9
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-03-26, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-03-16, 19:36 IST
payment status
Use the following in answering the questions: 1KB = 1024Bytes; 1MB = 1024KB

1) The unit of data transfer to and from disks is called “block” 0.5 points

Course True
outline False

Yes, the answer is correct.


About NPTEL Score: 0.5
() Accepted Answers:
True
Introduction
to Database 2) If record length is much less than the block size and ​unspanned organization is 0.5 points
Systems () used, then blocking factor of data file is ceil(B/r), where B is block size and r is record length

Week 0 () True
False
Week 1 ()
No, the answer is incorrect.
Score: 0
Week 2 () Accepted Answers:
False
Week 3 ()
3) In the linked allocation of mapping file blocks onto disk blocks, scanning operation is0.5 points
Week 4 () faster compared to the contiguous allocation

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=76&assessment=185 1/4
4/22/25, 7:31 PM Introduction to Database Systems - - Unit 12 - Week 9

Week 5 () True
False
Week 6 () Yes, the answer is correct.
Score: 0.5
Week 7 () Accepted Answers:
False
Week 8 ()
4) In an RDBMS both fixed-length and variable-length record types can be used 0.5 points

Week 9 () True
False
Introduction to
file Yes, the answer is correct.
orgranization Score: 0.5
(unit? Accepted Answers:
unit=76&lesson True
=77)
5) Consider the following parameters of a hard disk: seek time: 12ms, rotational delay: 2 points
File
orgranization 3ms. Suppose the read/write head of the disk is positioned on block 0 of track 20, then the
methods (unit? maximum time taken for the head to move to block 10 on the same track is:
unit=76&lesson
=78) 3 ms
12 ms
Dynamic File
orgranization 15 ms
using Hashing 30 ms
(unit?
unit=76&lesson No, the answer is incorrect.
Score: 0
=79)
Accepted Answers:
Index 3 ms
structures
(unit?
unit=76&lesson Use the following information to answer questions 6 and 7. Suppose extendible hashing is used to
=80) organize a file of data records. The size of each bucket is 2 records. The initial global depth value is
0 and the directory entry points to an empty bucket. A sequence of 11 records are to be inserted into
Lecture Slides
the file. When the hash function is applied to the keys of these records, the values 0, 1, 2, ..., 9 and
(unit?
10 are obtained, respectively, in that order.
unit=76&lesson
=81) 6) The number of data buckets in use after all the records are inserted is: 2 points
Week 9
6
Feedback form
: Introduction to 7
Database 8
Systems (unit?
11
unit=76&lesson
=82) No, the answer is incorrect.
Score: 0
Quiz: Week 9:
Accepted Answers:
Assignment 9
7
(assessment?
name=185)

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=76&assessment=185 2/4
4/22/25, 7:31 PM Introduction to Database Systems - - Unit 12 - Week 9

7) Choose the correct option for the following statements about the final file structure, 2 points
Week 10 ()
after the insertion of all the records.

Week 11 ()
S1. The global depth value is 3

Week 12 ()
S2. The local depth values of all the data buckets except one is same

Download S1, S2 are both false


Videos ()
S1, S2 are both true
S1 is true; S2 is false
Lecture
Notes () S1 is false; S2 is true

No, the answer is incorrect.


Problem Score: 0
Solving Accepted Answers:
Session - Jan S1, S2 are both true
2025 ()

Use the following information to answer questions 10 and 11. Suppose we want to build a multi-level
index on a key field X of a disk file of records. The file is not ordered on X. The file has the following
details: Number of records = 13,10,720; record length = 200 bytes; size of X = 13 bytes; size of
record pointer = 7 bytes; block size = 2048 bytes. Assume that the block pointer size is the same as
the size of the record pointer of the file.

8) The blocking factors for the data file and the index file, respectively, are 2 points

11, 101
10, 103
11, 103
10, 102
No, the answer is incorrect.
Score: 0
Accepted Answers:
10, 102

9) The number of blocks in the first and second level index files, respectively, are: 2 points

131072, 1286
13111, 126
13110, 125
12851, 126
No, the answer is incorrect.
Score: 0
Accepted Answers:
12851, 126

Use the following information to answer questions 12 and 13. Consider a large data file ordered on
the primary key field F1. It has a (non-ordering) key field F2. Both the fields have the same size.

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=76&assessment=185 3/4
4/22/25, 7:31 PM Introduction to Database Systems - - Unit 12 - Week 9

Suppose two multi-level indices L1 and L2 are built on the fields F1 and F2, respectively. Assume
that the block pointer length is the same as the length of the record pointer of the file.

10) Let the number of blocks in the level-1 indexes of L1 and L2 be x1 and x2, 2 points
respectively. The relationship between x1 and x2 is

x1 < x2
x1 = x2
x1 > x2
None of the above

Yes, the answer is correct.


Score: 2
Accepted Answers:
x1 < x2

11) Let the number of blocks in level-2 indexes of L1 and L2 be x1 and x2, respectively. 2 points
The relation between x1 and x2 is

x1 < x2
x1 = x2
x1 > x2
None of the above

Yes, the answer is correct.


Score: 2
Accepted Answers:
x1 < x2

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=76&assessment=185 4/4
4/22/25, 7:30 PM Introduction to Database Systems - - Unit 11 - Week 8

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 8 : Assignment 8
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-03-19, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-03-07, 21:04 IST
payment status

1) Consider the following statements: 2 points

Course S1: All normal-forms are defined using functional dependencies.


outline S2: Normalization is a top-down process to deal with redundancy in data representation.

About NPTEL Choose the correct option:


()
S1: True; S2: True
Introduction S1: True; S2: False
to Database S1: False; S2: False
Systems ()
S1: False; S2: True

Week 0 () Yes, the answer is correct.


Score: 2
Week 1 () Accepted Answers:
S1: False; S2: True

Week 2 ()
2) Fill in the blanks: 2 points

Week 3 ()
S1: An attribute of a relation schema R is called a prime-attribute of R if it is a member of some _ _
_ _ _ of R.
Week 4 ()

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=69&assessment=184 1/5
4/22/25, 7:30 PM Introduction to Database Systems - - Unit 11 - Week 8

S2: An attribute of a relation schema R is called a non-prime-attribute of R if it is NOT a member of


Week 5 ()
any _ _ _ _ of R

Week 6 () S1: Candidate-key; S2: Candidate-key


S1: Candidate-key; S2: Super-key
Week 7 ()
S1: Super-key; S2: Candidate-key

Week 8 () S1: Super-key; S2: Super-key


Yes, the answer is correct.
Normal forms - Score: 2
2 NF, 3NF, Accepted Answers:
BCNF (unit? S1: Candidate-key; S2: Candidate-key
unit=69&lesson
=70) 3) Consider a relation R(A, B, C, D, E, F, G) and the following FDs: 2 points

Properties of
{AB → CD, AF → D, DE → F, C → G, F → E, G → A}. Find out {C​, F }+ :
decompositions
(unit?
{C, F}
unit=69&lesson
=71) {C, F, G, E}
{C, F, G, E, A}
Normal forms -
4NF, 5NF (unit? {C, F, G, E, A, D}
unit=69&lesson
No, the answer is incorrect.
=72) Score: 0
Lecture Slides Accepted Answers:
(unit? {C, F, G, E, A, D}
unit=69&lesson
=73) 4) Consider a relation R(A, B, C, D, E, F) and the given FDs 2 points

Week 8
{AB → C, C → D, B → E, DE → F, F → AB}.
Feedback form
: Introduction to
Database Choose the incorrect option:
Systems (unit?
unit=69&lesson AB is a candidate key of R
=74) F is a candidate key of R

Quiz: Week 8 : BC is a candidate key of R


Assignment 8 CD is a candidate key of R
(assessment?
name=184)
No, the answer is incorrect.
Score: 0
Week 9 () Accepted Answers:
CD is a candidate key of R

Week 10 ()
5) Consider a relation R(part_no, part_description, part_price, supplier_id, 2 points
supplier_address).
Week 11 ()

The following FDs hold on R:


Week 12 ()

part_no → part_description
supplier_id → supplier_address

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=69&assessment=184 2/5
4/22/25, 7:30 PM Introduction to Database Systems - - Unit 11 - Week 8

{part_no, supplier_id} → part_price


Download
Videos ()
Find the candidate key of relation R:

Lecture part_no
Notes ()
supplier_id

Problem {supplier_id, part_no}


Solving None of the above
Session - Jan
Yes, the answer is correct.
2025 () Score: 2
Accepted Answers:
{supplier_id, part_no}

6) Consider the relation given in the Question 5, and find out which of the following 2 points
statement is TRUE about R:

R is in 1NF only
R is in 2NF but not in 3NF
R is in 3NF but not in BCNF
R is in BCNF

No, the answer is incorrect.


Score: 0
Accepted Answers:
R is in 1NF only

7) Consider the following statements: 2 points

S1: A relation in which every key contains only one attribute is in 2NF.
S2: In a 3NF relation, a non-key attribute may be transitively dependent on the primary key.

Choose the correct option:

S1: True; S2: True


S1: False; S2: True
S1: False; S2: False
S1: True; S2: False

No, the answer is incorrect.


Score: 0
Accepted Answers:
S1: True; S2: False

8) Consider a relation R(A, B, C, D, E, F, G) and the FD set 2 points

F1 = {B → ACD, DE → F, F → D, E → FGB, BCG → CE, EG → CD}.

Let F’ be a minimal cover of F1. Find out the incorrect statement about F’ :

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=69&assessment=184 3/5
4/22/25, 7:30 PM Introduction to Database Systems - - Unit 11 - Week 8

F’ contains F → D
F’ does not contain DE → F
F’ does not contain EG → CD
F’ does not contain BG → E

Yes, the answer is correct.


Score: 2
Accepted Answers:
F’ does not contain BG → E

9) Consider a relation R(A, B, C, D, E, F) and the FD set given below 2 points

F1 = { AB → C, B → D, D → E, AE → F, C → A }

Choose the correct option:

R is in 2NF, but not in 3NF


R is not in 2NF
R is in 3NF, but not in BCNF
R is in BCNF

No, the answer is incorrect.


Score: 0
Accepted Answers:
R is not in 2NF

10) Consider the decomposition of a relation R(A, B, C) into two relations R1(A, B) and 2 points
R2(B, C) and the given instances of R, R1, and R2. Suppose FD set for R is :{B → A, B → C}.What
is TRUE with respect to the decomposition:

Lossy; Dependency preserving


Lossless; Dependency preserving
Lossy; Not Dependency preserving
Lossless; Not Dependency preserving

Yes, the answer is correct.


Score: 2
Accepted Answers:
Lossless; Dependency preserving

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=69&assessment=184 4/5
4/22/25, 7:30 PM Introduction to Database Systems - - Unit 11 - Week 8

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=69&assessment=184 5/5
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 10 - Week 7

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 7 : Assignment 7
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-03-12, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-03-07, 20:59 IST
payment status
1) A functional dependency is a formal constraint among attributes of a relation. 0.5 points

True

Course False
outline Yes, the answer is correct.
Score: 0.5
Accepted Answers:
About NPTEL
True
()

2) A functional dependency is a property of the meaning of the attributes. 0.5 points


Introduction
to Database
True
Systems ()
False

Week 0 () Yes, the answer is correct.


Score: 0.5
Week 1 () Accepted Answers:
True

Week 2 ()
3) Functional dependencies are used in the process of schema design. 0.5 points

Week 3 ()
True
False
Week 4 ()

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=62&assessment=183 1/5
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 10 - Week 7

Yes, the answer is correct.


Week 5 () Score: 0.5
Accepted Answers:
Week 6 () True

4) If B ⊆ A, then FD A ​→ ​B is considered trivial. 0.5 points


Week 7 ()
True
Normal forms -
Introduction False
(unit? Yes, the answer is correct.
unit=62&lesson Score: 0.5
=63) Accepted Answers:
True
Deriving new
functional
dependencies 5) We use _ _ _ _ _ to find functional dependencies (FDs) logically implied by the given 2 points
(unit? set of FDs . Choose the most appropriate option:
unit=62&lesson
=64) Trivial FDs
Non-Trivial FDs
Proving
soundness and Axioms of sets
completeness Armstrong axioms
of Armstrong's
Axioms (unit? Yes, the answer is correct.
Score: 2
unit=62&lesson
=65) Accepted Answers:
Armstrong axioms
Lecture Slides
(unit? 6) Consider the statements S1 and S2 given below: 2 points
unit=62&lesson
=66)
S1: The following are all examples of trivial FDs:
Week 7 Uid ​→ ​Uid, {DeptId, DeptName} ​→ ​DeptId,
Feedback {StudId, MobileNum} ​→ ​MobileNum, {LoanNum, AccountNum} ​→ ​{LoanNum, AccountNum}
Form:Introducti S2: The following are all examples of non-trivial FDs:
on to Database
EmpId ​→ ​EmpName, EmpId ​→ ​EmpAddress,
Systems!!
{StudName, StudDob, StudMobileNum} ​→ { ​StudMobileNum, StudAddress}
(unit?
unit=62&lesson
=68) Choose the correct option:

Quiz: Week 7 : S1: True; S2: False


Assignment 7 S1: True; S2: True
(assessment?
name=183)
S1: False; S2: True
S1: False; S2: False
Week 8 ()
Yes, the answer is correct.
Score: 2
Week 9 () Accepted Answers:
S1: True; S2: True
Week 10 ()
7) If F = { EmpName → EmpExperience, {EmpPost, EmpExperience} → EmpSalary }, 2 points
then F entails which of the following:

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=62&assessment=183 2/5
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 10 - Week 7

Week 11 () EmpPost → EmpSalary


EmpName → EmpSalary
Week 12 () {EmpPost,EmpName} → EmpSalary
EmpExperience → EmpSalary
Download
Videos () Yes, the answer is correct.
Score: 2
Accepted Answers:
Lecture Notes {EmpPost,EmpName} → EmpSalary
()
8) Which of the following FD’s can be observed as ​not​holding on the given data 2 points
Problem instance?: Employee
Solving
Session - Jan
2025 ()

Empid determines EmpAddress


EmpMobileNum ​determines ​HomeCity
{EmpDob, Homecity} determines EmpAddress
{EmpName, HomeCity} determines EmpAddress

No, the answer is incorrect.


Score: 0
Accepted Answers:
{EmpDob, Homecity} determines EmpAddress

9) Consider the following statements regarding a relational scheme R and a set of FDs F 2 points
on it:

S1: Lossless, dependency-preserving decomposition of R into 3NF relations wrt F is always possible
S2: Lossless, dependency-preserving decomposition of R into BCNF relations wrt F is always
possible.

Choose the correct option:

S1: True, S2: True


S1: True, S2: False
S1: False, S2: True
S1: False, S2: False

Yes, the answer is correct.

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=62&assessment=183 3/5
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 10 - Week 7

Score: 2
Accepted Answers:
S1: True, S2: False

10) The functional dependencies for a relation R(A, B, C, D, E, F, G, H, I) are 2 points

S = { AD ​→ ​G, A ​→ ​F, H ​→ ​B, FB ​→ ​D, D →​C, I ​→ ​AH }.

Which of the following represents ​I+ ?

{I, A, H}
{I, A, H, F}
{I, A, H, F, B}
{I, A, H, F, B, C, D, G}

Yes, the answer is correct.


Score: 2
Accepted Answers:
{I, A, H, F, B, C, D, G}

11) The functional dependencies for a relation R​’ ​(A, B, C, D, E, F, G, H, I) are 2 points

S​’ ​= {AD ​→ ​G, A ​→ ​F, H ​→ ​B, FB ​→ ​E, D ​→ ​C, I →​AH}.

Which of the following represents I+ ?

{I, A, H}
{I, A, H, F, B}
{I, A, H, F, B, C, D, G}
{I, A, H, F, B, E}

Yes, the answer is correct.


Score: 2
Accepted Answers:
{I, A, H, F, B, E}

12) Refer to Question 10 and 11, and find out what is TRUE with respect to R and R​’​: 2 points

The candidate key for R is I


The candidate key for R is IE
The candidate key for R’ is IE
The candidate key for R is IDE

No, the answer is incorrect.


Score: 0
Accepted Answers:
The candidate key for R is IE

13) Consider the following statements: 2 points

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=62&assessment=183 4/5
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 10 - Week 7

S1: Armstrong axioms allow us to compute all elements of F+ for any given F
S2: Armstrong axioms may sometimes generate an incorrect functional dependency

Choose the correct option:

S1: True; S2: True


S1: True; S2: False
S1: False; S2: False
S1: False; S2: True

Yes, the answer is correct.


Score: 2
Accepted Answers:
S1: True; S2: False

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=62&assessment=183 5/5
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 9 - Week 6

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 6 : Assignment 6
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-03-05, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-02-22, 15:04 IST
payment status
Use the following schema of the academic institution relational database in the following
questions wherever required.

Course student(rollNo, name, degree, year, sex, deptNo, advisor)


outline department(deptId, name, hod, phone)
professor(empId, name, sex, startYear, deptNo, phone)
course(courseId, cname, credits, deptNo)
About NPTEL
enrollment(rollNo, courseId, sem, year, grade)
()
teaching(empId, courseId, sem, year, classRoom)
preRequisite(preCourseId, courseId)
Introduction
to Database
Systems () deptNo is a foreign key in the student, professor and course relations referring to deptId of
department relation;
Week 0 ()
advisor is a foreign key in the student relation referring to empId of professor relation;
Week 1 ()
hod is a foreign key in the department relation referring to empId of professor relation;

Week 2 ()
rollNo is a foreign key in the enrollment relation referring to rollNo of student relation;

Week 3 ()
courseId is a foreign key in the enrollment, teaching relations referring to courseId of course
relation;
Week 4 ()

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=54&assessment=182 1/7
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 9 - Week 6

Week 5 ()
empId is a foreign key of the teaching relation referring to empId of professor relation;

Week 6 ()
preCourseId and courseId are foreign keys in the preRequisite relation referring to courseId of the
Aggregate course relation.
functions (unit?
unit=54&lesson
1) Under which of the following conditions, the update operations on views are NOT 2 points
=55)
allowed?
Views (unit? (i) if the view definition has an aggregate operator
unit=54&lesson (ii) if the view definition includes two or more tables
=56) (iii) if the view is defined on a single table without group by, aggregates and the SELECT clause
Programmatic includes the primary key of the table
access of SQL
(unit? Only (ii)
unit=54&lesson Only (iii)
=57)
Only (i) and (ii)
Lecture Slides All (i), (ii) and (iii)
(unit?
unit=54&lesson
Yes, the answer is correct.
Score: 2
=58)
Accepted Answers:
Optional SQL Only (i) and (ii)
Assignment
(unit?
unit=54&lesson State whether the following statements are true or false.
=59)
2) HAVING clause can be used in a query only if GROUP BY clause is used 0.5 points
Week 6
Feedback True
Form:Introducti False
on to Database
No, the answer is incorrect.
Systems!!
Score: 0
(unit?
Accepted Answers:
unit=54&lesson
True
=60)

Quiz: Week 6 : 3) GROUP BY clause can be used in a query only if HAVING clause is used 0.5 points
Assignment 6
(assessment? True
name=182)
False

Week 7 () Yes, the answer is correct.


Score: 0.5
Week 8 () Accepted Answers:
False

Week 9 ()
4) It is mandatory to use an aggregate function in a query if GROUP BY clause is used 0.5 points

Week 10 ()
True
False
Week 11 ()

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=54&assessment=182 2/7
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 9 - Week 6

No, the answer is incorrect.


Week 12 () Score: 0
Accepted Answers:
Download False
Videos ()
5) Aggregate functions can be used in GROUP BY clauses 0.5 points

Lecture True
Notes ()
False

Problem Yes, the answer is correct.


Score: 0.5
Solving
Session - Jan Accepted Answers:
False
2025 ()

6) In which of the following SQL clauses of a main query can a sub-query be made use 2 points
of ?
(i) FROM (ii) WHERE (iii) HAVING

Only (ii)
Only (iii)
Only (ii) and (iii)
All (i), (ii) and (iii)

Yes, the answer is correct.


Score: 2
Accepted Answers:
All (i), (ii) and (iii)

7) Which of the following queries would select the courses with at least 10 ‘W’ grades in 2 points
some offering of the course ?

SELECT courseId
FROM enrollment
WHERE grade = ‘W’
GROUP BY courseId
HAVING count(rollNo) >= 10
SELECT courseId
FROM enrollment
WHERE grade = ‘W’
GROUP BY courseId, sem, year
HAVING count(rollNo) >= 10
SELECT courseId
FROM enrollment
WHERE grade = ‘W’ AND count(rollNo) >= 10
GROUP BY courseId
SELECT courseId
FROM enrollment
WHERE grade = ‘W’ AND count(rollNo) >= 10
GROUP BY courseId, sem, year

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=54&assessment=182 3/7
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 9 - Week 6

Yes, the answer is correct.


Score: 2
Accepted Answers:
SELECT courseId
FROM enrollment
WHERE grade = ‘W’
GROUP BY courseId, sem, year
HAVING count(rollNo) >= 10

8) Which of the following queries will retrieve students whose name has ‘p’ as the 2 points
second letter ?

SELECT rollNo FROM student where name = ‘_p’;


SELECT rollNo FROM student where name LIKE ‘_p’;
SELECT rollNo FROM student where name LIKE ‘_p%’;
SELECT rollNo FROM student where name IN ‘_p%’;

Yes, the answer is correct.


Score: 2
Accepted Answers:
SELECT rollNo FROM student where name LIKE ‘_p%’;

9) Consider two instances of the relations R1(A, B) and R2 (C, D) with the number of 2 points
rows 10 and 8, respectively. What is the least possible number of tuples in the result of the following
query?

SELECT *
FROM R1 FULL OUTER JOIN R2 ON R1.A = R2.C

0
18
8
10

No, the answer is incorrect.


Score: 0
Accepted Answers:
10

10) Consider the following queries. Which of the following queries is correct to find the 2 points
courses with no prerequisites?

(i) SELECT courseId


FROM preRequisite
GROUP BY courseId
HAVING count(preCourseId) = 0

(ii) SELECT courseId


FROM preRequisite a

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=54&assessment=182 4/7
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 9 - Week 6

WHERE NOT EXISTS (


SELECT preCourseId FROM preRequisite b WHERE a.courseId = b.courseId)

Only (i)
Only (ii)
Both (i) and (ii)
Neither (i) nor (ii)
No, the answer is incorrect.
Score: 0
Accepted Answers:
Neither (i) nor (ii)

11) Which of the following queries would find the id and name of the senior-most hod(s)? 2 points

SELECT p1.empId, p1.name


FROM professor p1
WHERE p1.startYear IN (
SELECT min(p.startYear)
FROM professor p, department d
WHERE p.empId = d.hod)
SELECT p.empId, p.name
FROM professor p, department d
WHERE p.empId = d.hod
WHERE p.startYear IN (
SELECT min(p1.startYear)
FROM professor p1)
SELECT p1.empId, p1.name
FROM professor p1, department d1
WERE p1.empId = d1.hod
AND p1.startYear IN (
SELECT min(p.startYear)
FROM professor p, department d
WHERE p.empId = d.hod)
None of the above

No, the answer is incorrect.


Score: 0
Accepted Answers:
SELECT p1.empId, p1.name
FROM professor p1, department d1
WERE p1.empId = d1.hod
AND p1.startYear IN (
SELECT min(p.startYear)
FROM professor p, department d
WHERE p.empId = d.hod)

12) Which one of the following queries would find the teacher(s) who taught CS1100 the 2 points
highest number of times?

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=54&assessment=182 5/7
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 9 - Week 6

CREATE VIEW EmpCount AS


SELECT empId, count(*) AS cnt
FROM teaching
WHERE courseId = ‘CS1100’
GROUP BY empId

SELECT empId
FROM EmpCount
WHERE cnt = (SELECT MAX(cnt) from EmpCount)
CREATE VIEW EmpCount AS
SELECT empId, count(*) AS cnt
FROM teaching
WHERE courseId = ‘CS1100’

SELECT empId
FROM EmpCount
WHERE cnt = (SELECT MAX(cnt) from EmpCount)
SELECT empId, max(count(*)) AS cnt
FROM teaching
WHERE courseId = ‘CS1100’
GROUP BY empId
SELECT empId
FROM teaching
WHERE courseId = ‘CS1100’
GROUP BY empId
HAVING COUNT(*) = (
SELECT max(count(*)) FROM teaching WHERE courseId = ‘CS1100’ )
Yes, the answer is correct.
Score: 2
Accepted Answers:
CREATE VIEW EmpCount AS
SELECT empId, count(*) AS cnt
FROM teaching
WHERE courseId = ‘CS1100’
GROUP BY empId

SELECT empId
FROM EmpCount
WHERE cnt = (SELECT MAX(cnt) from EmpCount)

13) Consider the following sets about different approaches to programmatic access of 2 points
databases and the properties that may apply to these approaches.

{1: Embedded SQL approach; 2: API based approach; 3: Database language approach}

{p: Only one connection to a DB server can be active at any time q: Open Database Connectivity
(ODBC); r: Cursors; s: Programmers need to learn a new language ; t: Multiple connections to DB

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=54&assessment=182 6/7
4/22/25, 7:29 PM Introduction to Database Systems - - Unit 9 - Week 6

servers can be active at any time}

Identify the correct matching between the sets:

1--p; 2--t; 3--q


1--t; 2--q; 3--s
1--s; 2--r; 3--p
1--p; 2--t; 3--s

No, the answer is incorrect.


Score: 0
Accepted Answers:
1--p; 2--t; 3--s

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=54&assessment=182 7/7
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 8 - Week 5

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 5 : Assignmnet 5
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-02-26, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-02-16, 18:32 IST
payment status
Use the following schema of the academic institution relational database in the following
questions wherever required.

Course student(rollNo, name, degree, year, sex, deptNo, advisor)


outline department(deptId, name, hod, phone)
professor(empId, name, sex, startYear, deptNo, phone)
course(courseId, cname, credits, deptNo)
About NPTEL
enrollment(rollNo, courseId, sem, year, grade)
()
teaching(empId, courseId, sem, year, classRoom)
preRequisite(preCourseId, courseId)
Introduction
to Database
Systems () deptNo is a foreign key in the student, professor and course relations referring to deptId of
department relation;
Week 0 ()
advisor is a foreign key in the student relation referring to empId of professor relation;
Week 1 ()
hod is a foreign key in the department relation referring to empId of professor relation;

Week 2 ()
rollNo is a foreign key in the enrollment relation referring to rollNo of student relation;

Week 3 ()
courseId is a foreign key in the enrollment, teaching relations referring to courseId of course
relation;
Week 4 ()

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=47&assessment=181 1/6
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 8 - Week 5

Week 5 ()
empId is a foreign key of the teaching relation referring to empId of professor relation;
Data definition
using SQL preCourseId and courseId are foreign keys in the preRequisite relation referring to courseId of the
(unit? course relation.
unit=47&lesson
=48)
1) Which of the following SQL sub-language constructs are used to insert rows into 2 points
Basic SQL tables?
query block
and subqueries DDL
(unit?
DML
unit=47&lesson
=49) Transaction control language
None of the above
Correlated
subqueries Yes, the answer is correct.
(unit? Score: 2
unit=47&lesson Accepted Answers:
=50) DML

Lecture Slides
2) Which of the following relational calculus operators does not have an equivalent 2 points
(unit?
unit=47&lesson keyword in SQL?
=51)
exists (∃)
Week 5
for all (∀)
Feedback Form
: Introduction to and (∧)
Database None of the above
Systems!!
Yes, the answer is correct.
(unit?
Score: 2
unit=47&lesson
Accepted Answers:
=52)
for all (∀)
Quiz: Week 5 :
Assignmnet 5 3) Suppose that in the given schema, we want to change the teaching table and add an 2 points
(assessment? extra column called ‘teachingAssistant’. A teaching assistant is a student who assists the professor
name=181)
of a course in clarifying student-doubts, setting up quizzes and evaluating students etc. Assume that
each course is allotted at most one teaching assistant. Which of the following commands is suitable
Week 6 ()
to enforce the above requirement?

Week 7 () ALTER TABLE teaching ADD teachingAssistant VARCHAR(10);


ALTER TABLE teaching ADD teachingAssistant VARCHAR(10) NOT NULL;
Week 8 ()
ALTER TABLE teaching ADD teachingAssistant VARCHAR(10) REFERENCES
Week 9 () professor(empId);
ALTER TABLE teaching ADD teachingAssistant VARCHAR(10) REFERENCES
Week 10 () student(rollNo);

Yes, the answer is correct.


Week 11 () Score: 2
Accepted Answers:
ALTER TABLE teaching ADD teachingAssistant VARCHAR(10) REFERENCES student(rollNo);

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=47&assessment=181 2/6
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 8 - Week 5

Week 12 () 4) Which of the following are unique keys in the teaching table definition? 2 points
(i) empId, courseId, year (ii) empId, courseId, sem, year (iii) empId, courseId, sem, year, classRoom
Download
Videos () Only (i)
Only (ii)
Lecture Only (ii) and (iii)
Notes ()
All (i), (ii) and (iii)

Problem No, the answer is incorrect.


Score: 0
Solving
Accepted Answers:
Session - Jan
Only (ii)
2025 ()

5) Suppose that in the given schema, the PRIMARY KEY of preRequisite table is only 2 points
“courseId”. Then, which of the following statement(s) is(are) TRUE in all data instances of the
database?

Every course in course table (specified in courseId column) has at least one prerequisite
Every course in course table (specified in courseId column) has exactly one prerequisite
Every course in preRequisite table (specified in courseId column) has exactly one
prerequisite
All of the above

Yes, the answer is correct.


Score: 2
Accepted Answers:
Every course in preRequisite table (specified in courseId column) has exactly one prerequisite

6) Suppose we need to find the roll numbers of students whose grades are neither ‘U’ 2 points
nor ‘W’ in the course having id ‘CS123’. What is the correct SQL query?

SELECT rollNo FROM enrollment


where courseId = ‘CS123’ and grade != ‘U’ or grade != ‘W’
SELECT rollNo FROM enrollment
where courseId = ‘CS123’ and NOT (grade != ‘U’ and grade != ‘W’)
SELECT rollNo FROM enrollment
where courseId = ‘CS123’ and grade NOT EXISTS (‘U’, ‘W’);
SELECT rollNo FROM enrollment
where courseId = ‘CS123’ and grade NOT IN (‘U’, ‘W’);

Yes, the answer is correct.


Score: 2
Accepted Answers:
SELECT rollNo FROM enrollment
where courseId = ‘CS123’ and grade NOT IN (‘U’, ‘W’);

7) Which of the following queries would find the students who enrolled in a course twice 2 points
(Note that a course is usually offered once in a year but some popular courses are offered in both
the semesters of the same year)?

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=47&assessment=181 3/6
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 8 - Week 5

SELECT e1.rollNo
FROM enrollment e1
WHERE EXISTS (SELECT * FROM enrollment e2
WHERE e1.rollNo = e2. rollNo and e1.courseId = e2.courseId)
SELECT e1.rollNo
FROM enrollment e1
WHERE EXISTS (SELECT * FROM enrollment e2
WHERE e1.rollNo = e2. rollNo and e1.courseId = e2.courseId
and e1.year = e2.year and e1.sem = e2.sem)
SELECT e1.rollNo
FROM enrollment e1
WHERE EXISTS (SELECT * FROM enrollment e2
WHERE e1.rollNo = e2. rollNo and e1.courseId = e2.courseId
and e1.year != e2.year and e1.sem != e2.sem)
SELECT e1.rollNo
FROM enrollment e1
WHERE EXISTS (SELECT * FROM enrollment e2
WHERE e1.rollNo = e2. rollNo and e1.courseId = e2.courseId
and (e1.year != e2.year or e1.sem != e2.sem))

Yes, the answer is correct.


Score: 2
Accepted Answers:
SELECT e1.rollNo
FROM enrollment e1
WHERE EXISTS (SELECT * FROM enrollment e2
WHERE e1.rollNo = e2. rollNo and e1.courseId = e2.courseId
and (e1.year != e2.year or e1.sem != e2.sem))

8) Consider the following query to retrieve the most senior professor (determined based 2 points
on startYear) :
SELECT p1.name
FROM professor p1
WHERE p1.startYear ---------- (SELECT p2.startYear
FROM professor p2)

Which of the following options is the correct filler for the blank ?

< ALL
<= ALL
<= ANY
IN

Yes, the answer is correct.


Score: 2
Accepted Answers:
<= ALL

9) Which of the following queries would find the courses with at least two prerequisites? 2 points

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=47&assessment=181 4/6
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 8 - Week 5

SELECT *
FROM course c1
WHERE EXISTS (SELECT * FROM prerequisite p1
WHERE p1.courseId = c1.courseId)
AND EXISTS (SELECT * FROM prerequisite p2
WHERE p2.courseId = c1.courseId)
SELECT *
FROM course c1
WHERE EXISTS (SELECT * FROM prerequisite p1
WHERE p1.courseId = c1.courseId)
AND EXISTS (SELECT * FROM prerequisite p2
WHERE p2.courseId = c1.courseId
AND p1.preCourseId <> p2.preCourseId)
SELECT *
FROM course c1
WHERE EXISTS (SELECT * FROM prerequisite p1, prerequisite p2
WHERE p1.courseId = c1.courseId
AND p2.courseId = c1. courseId)
SELECT *
FROM course c1
WHERE EXISTS (SELECT * FROM prerequisite p1, prerequisite p2
WHERE p1.courseId = c1.courseId
AND p2.courseId = c1. courseId
AND p1.preCourseId <> p2.preCourseId)

Yes, the answer is correct.


Score: 2
Accepted Answers:
SELECT *
FROM course c1
WHERE EXISTS (SELECT * FROM prerequisite p1, prerequisite p2
WHERE p1.courseId = c1.courseId
AND p2.courseId = c1. courseId
AND p1.preCourseId <> p2.preCourseId)

10) Consider the following query 2 points

SELECT rollNo as identifier


FROM student
UNION
SELECT empId as identifier
FROM professor

Which of the following statements is correct regarding the above query?

The query executes only if rollNo of student and empId of professor have same data types
The query executes in all cases (irrespective of the data types of rollNo and empId)
The query does not execute at all

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=47&assessment=181 5/6
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 8 - Week 5

None of the above

Yes, the answer is correct.


Score: 2
Accepted Answers:
The query executes only if rollNo of student and empId of professor have same data types

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=47&assessment=181 6/6
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 7 - Week 4

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 4 : Assignment 4
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-02-19, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-02-14, 17:36 IST
payment status
1) Which of the following relational query languages have the same expressive power? 1 point
I) Relational Algebra
II) Tuple relational calculus restricted to safe expressions
Course III) Relational Algebra with Select, Project, Cross-Product, Union and Difference operators only
outline
II and III only
I and II only
About NPTEL
() I and III only
I, II and III
Introduction No, the answer is incorrect.
to Database Score: 0
Systems () Accepted Answers:
I, II and III
Week 0 ()
2) What is the relational algebra expression equivalent to the following tuple relational 1 point
Week 1 () calculus expression, where r is a relation name?
{ t | r(t) ⋀ ( t.A = 10 ⋀ t.B = 20) }
Week 2 ()

σ (A=10 (r)
Week 3 () ⋁ B=20)

σ (A=10) (r) ∪ σ (B=20) (r)


Week 4 ()

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=39&assessment=180 1/5
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 7 - Week 4

σ (A=10) (r) ∩ σ (B=20) (r)


Example
Queries in
Relation Model σ (A=10) (r) ーσ (B=20) (r)
and Outer Join
Yes, the answer is correct.
Operation Score: 1
(unit?
Accepted Answers:
unit=39&lesson
σ (A=10) (r) ∩ σ (B=20) (r)
=40)
3) Consider the following two statements and choose the correct option: 1 point
Convert ER-
S1: Each record of the referencing relation can relate to at most one record of the referenced
Model to a
Relational
relation.
Model (unit? S2: Each record of the referenced relation can relate to at most one record of the referencing
unit=39&lesson relation.
=41)
S1 is true, S2 is true
Introduction to
S1 is false, S2 is true
tuple relational
calculus (unit? S1 is false, S2 is false
unit=39&lesson S1 is true, S2 is false
=42)
Yes, the answer is correct.
Example TRC Score: 1
queries (unit? Accepted Answers:
unit=39&lesson S1 is true, S2 is false
=43)

Lecture Slides
4) Given the following relational schema 1 point
(unit?
unit=39&lesson Employee( EmpID, EmpName, Salary, Age, Address, Department, HireDate)
=44)
Which of the following TRC query retrieves employee id where the employee's salary is greater than
Week 4
₹ 60,000, the employee's age is less than 40, the employee's department is either "IT" or
Feedback form
: Introduction to "Marketing", and the employee's hire date is after January 1st, 2020.
Database
Systems (unit? Choose the correct option:
unit=39&lesson
=45) { t.EmpID | Employee(t) ∧ t.Salary > 60000 ∧ t.Age < 40 ∧ (t.Department = "IT" ⋁
t.Department = "Marketing") ∧ t.HireDate > '01/01/2020'}
Quiz: Week 4 :
Assignment 4
{ t.EmpID | Employee(t) ∧ t.Salary > 60000 ⋁ t.Age < 40 ⋁ (t.Department = "IT" ∧
(assessment? t.Department = "Marketing") ⋁ t.HireDate > '01/01/2020'}
name=180) { t.EmpID | Employee(t) ∧ (t.Salary > 60000 ∧ t.Age < 40) ⋁ (t.Department = "IT" ∧
t.Department = "Marketing") ∧ t.HireDate > '01/01/2020'}
Week 5 ()
{ t.EmpID | Employee(t) ∧ (t.Salary > 60000 ⋁ t.Age < 40) ∧ (t.Department = "IT" ⋁
t.Department = "Marketing") ∧ t.HireDate > '01/01/2020'}
Week 6 ()
Yes, the answer is correct.
Week 7 () Score: 1
Accepted Answers:
{ t.EmpID | Employee(t) ∧ t.Salary > 60000 ∧ t.Age < 40 ∧ (t.Department = "IT" ⋁ t.Department =
Week 8 ()
"Marketing") ∧ t.HireDate > '01/01/2020'}

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=39&assessment=180 2/5
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 7 - Week 4

5) There are two weak entities E1 and E2, where E1 is the owner entity for E2. 1 point
Week 9 ()
Consider relational representation of E1 and E2 and choose correct option:

Week 10 () Mapping of E1 should be done before E2


Mapping of E2 should be done before E1
Week 11 ()
E1 and E2 can be mapped in any order

Week 12 () Partial key of E1 includes the partial key of E2


Yes, the answer is correct.
Download Score: 1
Videos () Accepted Answers:
Mapping of E1 should be done before E2
Lecture
Notes () 6) Consider the relation 1 point
employee( name, sex, supervisorName )
Problem The attribute supervisorName gives the name of the supervisor of the employee under
Solving consideration. What does the following Tuple Relational Calculus query produce?
Session - Jan { e.name | employee(e) ⋀
2025 () (∀x) [ ㄱemployee(x) ⋁ x.supervisorName ≠ e.name ⋁ x.sex = “male” ]}

Names of employees with a male supervisor


Names of employees with no immediate male supervisees
Names of employees with no immediate female supervisees
Names of employees with a female supervisor

Yes, the answer is correct.


Score: 1
Accepted Answers:
Names of employees with no immediate female supervisees

7) Given the following relational schemas 1 point


Student (rollNo, name, age, sex, deptNo, advisor)
Department (deptId, dName, hod, phoneNo)

Which of the following will be the TRC query to obtain the department names that do not have any
girl students?

{d.dname | department(d) ∧ ¬((∃(s)) student(s) ∧ s.sex ≠ ‘F’ ∧ s.deptNo = d.deptId)}


{d.dname | department(d) ∧ ((∀(s)) student(s) ∧ s.sex ≠ ‘F’ ∧ s.deptNo = d.deptId)}
{d.dname | department(d) ∧ ¬((∃(s)) student(s) ∧ s.sex = ‘F’ ∧ s.deptNo = d.deptId)}
None of these.
Yes, the answer is correct.
Score: 1
Accepted Answers:
{d.dname | department(d) ∧ ¬((∃(s)) student(s) ∧ s.sex = ‘F’ ∧ s.deptNo = d.deptId)}

8) Consider the relations S1( A, B, C ) and S2( C, D, E ) with primary keys A and C, 1 point
respectively. The relation S1 contains 2000 tuples and S2 contains 2500 tuples. The maximum size

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=39&assessment=180 3/5
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 7 - Week 4

of the join S1 ⋈ S1.C = S2.C S2 is

2000
2500
4500
5000

No, the answer is incorrect.


Score: 0
Accepted Answers:
2000

9) Consider the following relational schema where rollNo and courseId are foreign keys in 1 point
Enrollment referring to rollNo in Student and courseId in Courses, respectively:
Student( rollNo, name, degree, year, sex, deptNo, advisor )
Courses( courseId, cname, credits, deptNo )
Enrollment( rollNo, courseId, sem, year, grade )
Consider the TRC query given below:

{s.rollNo, s.name | Student(s) ∧ (∃e1)( Enrollment(e1) ∧ (e1.rollNo = s.rollNo)) }

Which one of the following is the correct interpretation of the above query?

Retrieve rollNo and name of students who have enrolled for exactly one course
Retrieve rollNo and name of students who have enrolled for more than one course
Retrieve rollNo and name of students who have enrolled for at least one course
Retrieve rollNo and name of students who have all enrolled for same course

Yes, the answer is correct.


Score: 1
Accepted Answers:
Retrieve rollNo and name of students who have enrolled for at least one course

10) Consider the statements given below: 1 point


P: Tuple Relational Calculus (TRC) is a non-procedural query language
Q: Tuple Relational Calculus (TRC) expression specifies what is to be retrieved rather than
how to retrieve it

Choose the correct option:

P is true and Q is false


Both P and Q are true and Q is the correct reason for P
Both P and Q are true and Q is not the correct reason for P
Both P and Q are false

Yes, the answer is correct.


Score: 1
Accepted Answers:
Both P and Q are true and Q is the correct reason for P

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=39&assessment=180 4/5
4/22/25, 7:28 PM Introduction to Database Systems - - Unit 7 - Week 4

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=39&assessment=180 5/5
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 6 - Week 3

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 3 : Assignment 3
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-02-12, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-02-04, 17:26 IST
payment status
1) Which of the following statements is TRUE? 1 point

A key for a relation can be figured out just by looking at the instance data.

Course A relation has exactly one key.


outline It is possible that a relation has no key.
A key for a relation can only be determined from the meaning of its attributes.
About NPTEL Yes, the answer is correct.
() Score: 1
Accepted Answers:
Introduction A key for a relation can only be determined from the meaning of its attributes.
to Database
Systems ()
State if the following statements are TRUE or FALSE:

Week 0 () 2) In an instance of a relation, it is possible that the value of a key attribute is NULL in a 1 point
certain row.
Week 1 ()
True
Week 2 () False

Yes, the answer is correct.


Week 3 () Score: 1
Accepted Answers:
Relational
Loading Data False
[MathJax]/jax/element/mml/optable/SuppMathOperators.js
Model and

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=31&assessment=175 1/7
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 6 - Week 3

Notion of Keys 3) It is possible for a foreign key of a relation to refer to the primary key of the relation 1 point
(unit? itself.
unit=31&lesson
=32) True

Introduction to False
Relational
Yes, the answer is correct.
Algebra (unit? Score: 1
unit=31&lesson Accepted Answers:
=33) True
Operators in
Relational 4) Every relation scheme can have at most one foreign key 1 point
Model (unit?
unit=31&lesson True
=34) False
Uses of Yes, the answer is correct.
Renaming, Join Score: 1
and Division in Accepted Answers:
Relation False
Algebra (unit?
unit=31&lesson 5) If K is supposed to be a key for scheme R, any relation instance r on R should not have1 point
=35)
two tuples that have identical values for attributes in K.
Lecture Slides
(unit?
True
unit=31&lesson False
=36)
Yes, the answer is correct.
Week 3 Score: 1
Feedback Form Accepted Answers:
: Introduction to True
Database
Systems!! 6) Consider the following tables: 1 point
(unit?
unit=31&lesson
=38)

Quiz: Week 3 :
Assignment 3
(assessment?
name=175)

Week 4 ()

Week 5 ()

Week 6 ()

Week 7 ()

Week 8 ()
Loading [MathJax]/jax/element/mml/optable/SuppMathOperators.js

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=31&assessment=175 2/7
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 6 - Week 3

Week 9 ()

Week 10 ()

Week 11 ()

Week 12 ()

Download
Videos ()

Lecture
Notes ()

Problem
Solving
Session - Jan
2025 ()

How many tuples exist in the query (A ∪ B)⟗ ( A . id > 20 ∨ C . id < 10 ) C ?

7
8
9
10

Yes, the answer is correct.


Score: 1
Accepted Answers:
8

7) Consider the following relations A(X, Y, Z) and B(D, E, F): 1 point

Loading [MathJax]/jax/element/mml/optable/SuppMathOperators.js

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=31&assessment=175 3/7
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 6 - Week 3

What is the result of the following expression: Π ( X , Y ) (σ ( X = 1 ) ∨ ( X = 4 ) (A)) − Π ( D , E ) (σ ( D ≠ 3 ) (B))

{(6,8), (9,9)}
Empty relation

A relation with scheme (X, Y) and tuples { (6,8) }

A relation with scheme (X, Y) and tuples { (9,9) }

No, the answer is incorrect.


Score: 0
Accepted Answers:
Empty relation

8) Consider the following relations A(X,Y,Z) and B (D,E,F) and find out how many tuples 1 point
will there be in the result of the following relational algebra expression?

22
23
24
Loading [MathJax]/jax/element/mml/optable/SuppMathOperators.js

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=31&assessment=175 4/7
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 6 - Week 3

25

No, the answer is incorrect.


Score: 0
Accepted Answers:
25

9) Information about a collection of students is given by the relation studInfo(studId, 1 point


name, sex, yearOfJoin). The relation enroll(studId, courseId) gives which student has enrolled for
(or taken) that course(s). Assume that every course is taken by at least one male and at least one
female student. What does the following relational algebra expression represent?

Courses in which all female students have enrolled.


Courses in which a proper subset of female students have enrolled.
Courses in which all male students have enrolled.
Courses in which only female students have enrolled.

No, the answer is incorrect.


Score: 0
Accepted Answers:
Courses in which a proper subset of female students have enrolled.

10) Choose the correct statement(s): 1 point

Two schemes are union compatible if the domain of at least one pair of corresponding
attributes match.
A join operation is equivalent to performing a cross product of its operands followed by a
select operation using the join condition.

The operators constitute a complete set of relational algebra operators.


The difference relational algebra operator requires its operands to be union-compatible.

Yes, the answer is correct.


Score: 1
Accepted Answers:
A join operation is equivalent to performing a cross product of its operands followed by a select
operation using the join condition.
The operators constitute a complete set of relational algebra operators.
The difference relational algebra operator requires its operands to be union-compatible.

11) Consider the following relations A(X,Y,Z) and B(X,Y) and the given instances. What is 1 point
the result of the relational algebra expression?

Loading [MathJax]/jax/element/mml/optable/SuppMathOperators.js

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=31&assessment=175 5/7
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 6 - Week 3

Empty relation
A relation with scheme Z and tuple { (3) }
A relation with scheme Z and tuples { (3), (5) }
{3,5}

Yes, the answer is correct.


Score: 1
Accepted Answers:
A relation with scheme Z and tuples { (3), (5) }

12) Given two union compatible relations X(A,B) and Y(C,D). What is the result of the 1 point
operation?

Yes, the answer is correct.


Score: 1
Accepted Answers:

13) If X, Y and Z are as specified below, which of the following statements is TRUE wrt 1 point
different keys of a relational DB?

X = set of all primary keys


Y = set of all candidate keys
Z = set of all super keys

Loading [MathJax]/jax/element/mml/optable/SuppMathOperators.js

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=31&assessment=175 6/7
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 6 - Week 3

Yes, the answer is correct.


Score: 1
Accepted Answers:

Loading [MathJax]/jax/element/mml/optable/SuppMathOperators.js

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=31&assessment=175 7/7
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 5 - Week 2

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 2 : Assignment 2
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-02-05, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-02-04, 17:26 IST
payment status
1) While creating an ER diagram, Arjun is confused as to what shape he must choose to 1 point
represent the attribute “Hobby” of the Person entity type. Arjun understands that a person may have
many hobbies. Which of the shapes should he choose?
Course
Ellipse
outline
Double Ellipse

About NPTEL Ellipse connected to an Ellipse


() Dotted-line Ellipse

Yes, the answer is correct.


Introduction Score: 1
to Database Accepted Answers:
Systems () Double Ellipse

Week 0 () 2) Suppose R is a relationship type with two participating entity types E1 and E2. The 1 point
number of entities in E1 and E2 are 2 and 4, respectively. How many different non-empty
Week 1 () relationship sets are possible in this case?

Week 2 () 255
8
Introduction to
2256
ER Model
(unit? 256

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=24&assessment=174 1/5
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 5 - Week 2

unit=24&lesson Yes, the answer is correct.


=25) Score: 1
Accepted Answers:
Entities and 255
Relationships
(unit? 3) Suppose X is a composite attribute of an entity type and has three components - C1, 1 point
unit=24&lesson C2 and C3, where C1 and C2 are multi-valued. If domain sets of C1, C2 and C3 have 2, 3, and 5
=26) elements respectively, what is the size of the domain of X?

Modelling
30
Weak Entities
and Design 160
Choices (unit? 32
unit=24&lesson
128
=27)
Yes, the answer is correct.
Lecture Slides Score: 1
(unit? Accepted Answers:
unit=24&lesson 160
=28)

Week 2 4) Suppose worksAt is a relationship type with two participating entity types Person and 1 point
Feedback form Organisation. What is the appropriate cardinality ratio for Person:Organization?
: Introduction to
Database 1:N
Systems (unit? N:1
unit=24&lesson
M:N
=29)
1:1
Quiz: Week 2 :
Assignment 2 Yes, the answer is correct.
(assessment?
Score: 1
name=174) Accepted Answers:
N:1
Week 3 ()
5) In the company XYZ, employees are given freedom to choose upto 3 projects to work 1 point
Week 4 () on. Usually, a team of 4-5 people work on a given project. Suppose worksOn is a relationship type
with two participating entity types Employee and Project. What is the appropriate cardinality ratio
Week 5 () for Employee:Project

Week 6 () 1:N
N:1
Week 7 () M:N
1:1
Week 8 ()
Yes, the answer is correct.
Score: 1
Week 9 ()
Accepted Answers:
M:N
Week 10 ()
6) Consider a binary relationship ExistsIn between entity types City and State. It records 1 point
Week 11 () as to which city is located in what state. Suppose the cardinality ratio constraint of the this
relationship is expressed using (min,max) notation as (u,v) on the line connecting City to ExistsIn

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=24&assessment=174 2/5
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 5 - Week 2

and (x,y) on the line connecting State to ExistsIn, which one of the following is correct: (Assume that
Week 12 ()
the capital of any state is a city).

Download (u,v) = (1,1); (x,y) = (0,N)


Videos ()
(u,v) = (1,N); (x,y) = (1,1)

Lecture (u,v) = (1,1); (x,y) = (1,N)


Notes () (u,v) = (1,N); (x,y) = (0,N)
No, the answer is incorrect.
Problem Score: 0
Solving Accepted Answers:
Session - Jan (u,v) = (1,1); (x,y) = (1,N)
2025 ()
State TRUE or FALSE

7) The value of a composite attribute depends on the value of some other attribute. 1 point

True
False
No, the answer is incorrect.
Score: 0
Accepted Answers:
False

8) The domain of a multi-valued attribute is the set of subsets of the set consisting of 1 point
basic values.

True
False
Yes, the answer is correct.
Score: 1
Accepted Answers:
True

9) In many to one binary relationships between two entities E1 and E2, an E2 entity may 1 point
be associated with many E1 entities whereas an E1 entity may be associated with at most one E2
entity.

True
False
Yes, the answer is correct.
Score: 1
Accepted Answers:
True

10) An entity set relating to itself gives rise to a recursive relationship 1 point

True
False

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=24&assessment=174 3/5
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 5 - Week 2

No, the answer is incorrect.


Score: 0
Accepted Answers:
True

11) Suppose entity set A = {a,b,c,d,e} and entity set B = {w,x,y,z}. They participate in a 1 point
binary relationship R and the instances in R are: { (a,w), (a,z), (b,w), (c,x), (d,x), (e,y) }. Which one
of the following is correct?

Cardinality ratio A:B is many-to-one; A participates partially; B participates completely.


Cardinality ratio A:B is one-to-many; A participates completely; B participates completely.
Cardinality ratio A:B is many-to-one; A participates completely; B participates partially.
Cardinality ratio A:B is many-to-many; A participates completely; B participates completely.

No, the answer is incorrect.


Score: 0
Accepted Answers:
Cardinality ratio A:B is many-to-many; A participates completely; B participates completely.

12) Choose the correct statement 1 point

A weak entity can exist even if it is not related to any other entity.
Relationship types can have attributes.
A weak entity type can not be the owner of another weak entity type.
Weak entity set has to have a key attribute.

Yes, the answer is correct.


Score: 1
Accepted Answers:
Relationship types can have attributes.

13) Which of the following is true with respect to ER model design choices: 1 point

Weak entities are preferred over composite multi-valued attributes in every single case
Composite multi-valued attributes are preferred over weak entities in every single case
If a thing, not of independent existence, participates in a relationship, it is better to model it
as a weak entity
If a thing, not of independent existence, participates in a relationship, it is better to model it
as a composite multi-valued attribute

Yes, the answer is correct.


Score: 1
Accepted Answers:
If a thing, not of independent existence, participates in a relationship, it is better to model it as a
weak entity

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=24&assessment=174 4/5
4/22/25, 7:27 PM Introduction to Database Systems - - Unit 5 - Week 2

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=24&assessment=174 5/5
4/22/25, 7:25 PM Introduction to Database Systems - - Unit 4 - Week 1

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dampy.singh35694@paruluniversity.ac.in 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Introduction to Database Systems (course)


Click to register
for Certification
exam
Week 1 : Assignment 1
(https://examform.nptel.ac.in/2025_01/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already Due on 2025-02-05, 23:59 IST.


registered, click
to check your Assignment submitted on 2025-02-04, 17:25 IST
payment status
1) Which of the following statements is incorrect regarding databases? 1 point

It captures information about a real-world enterprise or part of an enterprise.

Course It is maintained to serve specific data management needs of an enterprise.


outline Activities of the enterprise are supported by the database and continually update the
database.
About NPTEL It is difficult to access the data stored in a database. Complex queries have to be written to
() get even simple data.

Yes, the answer is correct.


Introduction Score: 1
to Database Accepted Answers:
Systems () It is difficult to access the data stored in a database. Complex queries have to be written to get
even simple data.
Week 0 ()
2) Which of the following statements is incorrect regarding functionalities of databases? 1 point
Week 1 ()
Allows for a standard method of data retrieval through queries.
Introduction Queries are returned efficiently.
(unit?
unit=17&lesson
Doesn’t have facilities to provide data backup. In case of a failure, all data is lost.
=18) Allows for a large number of concurrent users with minimal drop-off in performance

Database Yes, the answer is correct.


Architecture
S

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=17&assessment=173 1/5
4/22/25, 7:25 PM Introduction to Database Systems - - Unit 4 - Week 1

(unit? Score: 1
unit=17&lesson Accepted Answers:
=19) Doesn’t have facilities to provide data backup. In case of a failure, all data is lost.

RDBMS 3) Which of the following statements best describes a Physical Data Model? 1 point
Architecture
(unit? It is a high-level description of informational needs underlying the design of a database
unit=17&lesson It is used to represent only the logical part of the database
=20)
It is a data model explaining the schema of the database
Lecture Slides
It is a description of the database giving details about record formats, file structures etc.
(unit?
unit=17&lesson Yes, the answer is correct.
=21) Score: 1
Accepted Answers:
Week 1 It is a description of the database giving details about record formats, file structures etc.
Feedback form
: Introduction to
4) Which of the following is true about an ER model? 1 point
Database
Systems (unit?
It consists of the various tables and links among them in the domain being modeled along
unit=17&lesson
with operations to be performed on data.
=22)
It consists of the various tables and links among them in the domain being modeled.
Quiz: Week 1 :
It consists of the various entity types of interest and the relationships among them in the
Assignment 1
(assessment?
domain being modeled.
name=173) It consists of the various entity types of interest and the relationships among them in the
domain being modeled along with operations to be performed on data.
Week 2 ()
Yes, the answer is correct.
Score: 1
Week 3 ()
Accepted Answers:
It consists of the various entity types of interest and the relationships among them in the domain
Week 4 () being modeled.

Week 5 () 5) Consider the following sets 1 point


M = { p: Recovery Manager; q: Transaction Manager; r: Buffer Manager; s: RDBMS Run-time
Week 6 () System}
F = { w: Transaction Error Handling; x: Concurrency Control; y: Query Execution; z: Paging}
Week 7 () What is the most appropriate matching between sets M and F?

Week 8 () p -- w; q -- x; r -- z; s -- y;
p -- z; q -- w; r -- y; s -- x;
Week 9 ()
p -- w; q -- z; r -- x; s -- y;
p -- z; q -- w; r -- z; s -- y;
Week 10 ()
Yes, the answer is correct.
Week 11 () Score: 1
Accepted Answers:
p -- w; q -- x; r -- z; s -- y;
Week 12 ()

6) Which of the following best describes the conventional role of a Data Analyst 1 point
Download

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=17&assessment=173 2/5
4/22/25, 7:25 PM Introduction to Database Systems - - Unit 4 - Week 1

Videos () Person who uses embedded SQL in a high-level language and develops programs to handle
functional requirements of an information system.
Lecture
Person who designs the logical scheme of a database system.
Notes ()
Person who uses SQL to generate answers for complex queries.
Problem Person who monitors usage and creates necessary index structures to speed up query
Solving execution.
Session - Jan
Yes, the answer is correct.
2025 () Score: 1
Accepted Answers:
Person who uses SQL to generate answers for complex queries.

7) Consider the following statements: 1 point


S1: A view usually provides access to a part of the data relevant to a group of users.
S2: A view usually provides access to the complete database.
S3: Naive users require a deep understanding of an information system to use it.
S4: Naive users do not require a deep understanding of an information system to use it.
Choose the correct option:

S1 and S3 are TRUE


S1 and S4 are TRUE
S2 and S3 are TRUE
S2 and S4 are TRUE

Yes, the answer is correct.


Score: 1
Accepted Answers:
S1 and S4 are TRUE

8) The ability to modify physical-level schema without affecting the logical-level/view-level 1 point
schema is called:

Logical Data Independence


View Data Independence
Physical Data Independence
Application Data Independence

Yes, the answer is correct.


Score: 1
Accepted Answers:
Physical Data Independence

State TRUE or FALSE

9) Requirements collection is the first step while creating a database system. 1 point

True
False

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=17&assessment=173 3/5
4/22/25, 7:25 PM Introduction to Database Systems - - Unit 4 - Week 1

Yes, the answer is correct.


Score: 1
Accepted Answers:
True

10) Application programmers don’t need a complete understanding of the database 1 point
schema or views.

True
False

No, the answer is incorrect.


Score: 0
Accepted Answers:
False

11) Indexes are added to databases to speed up query execution. 1 point

True
False

Yes, the answer is correct.


Score: 1
Accepted Answers:
True

12) OS file systems have the advantage of allowing concurrent users, while compared to a 1 point
RDBMS system.

True
False

Yes, the answer is correct.


Score: 1
Accepted Answers:
False

13) Which of the following are generally stored in the disk storage of an RDBMS system? 1 point

View Definitions.
Index Structures.
Database Log.
User cookies.

Yes, the answer is correct.


Score: 1
Accepted Answers:
View Definitions.
Index Structures.
Database Log.

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=17&assessment=173 4/5
4/22/25, 7:25 PM Introduction to Database Systems - - Unit 4 - Week 1

https://onlinecourses.nptel.ac.in/noc25_cs40/unit?unit=17&assessment=173 5/5

You might also like