CS & IT
ENGINEERING
Database
Management System
Query Languages
DPP-01 Discussion Notes By- Mili Dhara Ma’am
[MCQ]
#Q. Consider the following statements:
S1: List N (List N–1……(List 1(R))
List 1 (List 2……(List N (R))
S2: 𝜎cn 𝜎c . . . . . 𝜎c1 R ≡ 𝜎c1 𝜎c2 . . . . 𝜎CN 𝐶
n–1
Which of the following statement(s) is/are correct?
A S1 only B S2 only
C Both S1 and S2 only D Neither S1 nor S2
[MCQ]
#Q. Consider the following table
The number of tuples in (I⨝J⨝K) where ⨝ is the natural join is
A 5 B 8
C 10 D 11
[MCQ]
#Q. Let R1 and R2 be two relations which are union compatible with the same
set of attributes.
S1: R1 R2 = T1 ⋈T2
S2: R1 R2 = T1 ⋈T2
Which of the above statement(s) are INCORRECT?
A S1 only
B S2 only
C Both S1 and S2 only
D Neither S1 nor S2
[MSQ]
#Q. Consider the following relations:
Enroll (Sid, Papercode), Paper(Papercode, Desc) Which of the following
relational algebra displays the sid’s who only enrolled for Papercode having
descriptions (Desc) as “CS”?
A sid (Enroll ⋈ Paper)
Desc = CS
B sid (Enroll) – sid ((Enroll ⋈ (Paper))
Desc = CS
C sid (Enroll) – sid( (Enroll ⋈ (Paper))
Desc < > CS
D None
[MCQ]
#Q. Consider a relations work (EmpiD, Project ID)
The suitable relational algebra expression that projects the employee ids
who work exactly in one project is
A Empid (Work) – Empid(Work ⋈ E, P (work)) B Empid (Work ⋈ E, P (work))
Empid = E Empid = E
^ ^
Project Id = P Project ID P
C Empid (work) –Empid (work ⋈ E, P (work)) D None
Empid = E
^
Project ID P
[MCQ]
#Q. Consider the relation R(ABCD) which of the following relational algebra
expression return the lowest value of B? (R1 and R2 are rename of R)
I. ΠR2⋅B (R1 ⨝ R1.B < R2.B R2)
II. ΠB R – ΠR1⋅B (R1 ⨝ R1.B > R2.B R2)
III. ΠB R – ΠR1⋅B (R1 ⨝ R1.B < R2.B R2)
IV. ΠB R
A I B II
C III D IV
[MCQ]
#Q. Consider a Schema with Two Relations P (U, V, X) and Q (X, Y, Z) where all
values are integer. There is no assumptions about the keys. Consider the
following relational algebra expression.
I. U.Z(P ⨝ X = 3 Q)
II. U.Z(U (P) × C = 3 (Q))
II. U(X=3 (P) × E (X = 3(Q))
IV. U.(X=3 (P) × X (Q))
Which of the above are equivalent?
A I B II
C III D IV
[MCQ]
#Q. Consider the following RA expression
P: sid (student) –sid (student ⋈ I, G, M (Student))
Marks < M
Gender = G
On a relation student (sid, Gender, Marks) and I = sid, G = Gender,
M = Marks.
The above R.A displays?
A The sid of the student who obtained the maximum marks.
B The sids of the male and female students who obtained the maximum marks
in their respective gender.
C The sids of male student who scored higher than all the female students
D None
[MSQ]
#Q. Consider the relation
Works (Eid Pid) project (Pid, Name)
The relational algebra expression that displays the Eids who work in every
project Name = ‘M .
A Eid, Pid (works)/ Pid (Name = M (Project))
Eid ( Work ) − Eid ( Work ) pid ( Project ) − Eid Pid ( works )
B Eid Name = m
C
Eid ( Work ) − Eid ( Work ) pid
(Name < > m
( Project ) ) Eid Pid
– ( works )
None
D
[MCQ]
#Q. Consider the two relations R1 and R2 such that they have no attributes in
common then
S1: R1 ⋈ R2 = R1 × R2
S2: R1 ⋈ R2 =
Which of the given statement(s) is/are correct?
A S1 only
B S2 only
C Both S1 and S2 only
D Neither S1 nor S2
THANK - YOU