You are on page 1of 3

DBMS DPP PART - 4 BY-SUNIL YADAV SIR 1

DBMS DPP PART - 4

1. Consider the following relations A, R: All attributes used in the


B, C. GROUP BY clause must appear
in the SELECT clause.
S: Not all attributes used in the
GROUP BY clause need to
appear in the SELECT clause
(a) P and R (b) P and S
(c) Q and R (d) Q and S
3. What is the optimized version of
the relation algebra expression
( ( ( ( )))) where A1, A2
are sets of attributes in with
and F1, F2 are Boolean
expressions based on the attributes
in r?
(a) ( ( ) ( ))

(b) ( ( )( ))
(c) ( ( )( ))

(d) ( ( )( ))
4. Suppose R1(A, B) and R2(C, D) are
two relation schemas. Let r1 and r2
be the corresponding relation
instances. B is foreign key that
refers to C in R2. If data in r1 and r2
How many tuples does the result of satisfy referential integrity
the following relational algebra constraints, which of the following
expression contain? Assume that is ALWAYS TRUE?
the schema of AUB is the same as (a) ( ) ( )
that of A. (b) ( ) ( )
(c) ( ) ( )
(d) ( ) ( )
(a) 7 (b) 4 5. Given the following statements:
(c) 5 (d) 9 S1: A foreign key declaration can
2. Which of the following statements always be replaced by an
are TRUE about an SQL query? equivalent check assertion in
P: An SQL query can contain a SQL.
HAVING clause even if it does S2: Given the table R(a, b, c) where
not have a GROUP BY clause. a and b together from the
Q: An SQL query can contain a primary key, the following is a
HAVING clause even if it has a valid table definition.
GROUP BY clause. CREATE TABLE S (
a INTEGER,
d INTEGER,

Join RPSC Programmer Offline/Online Batch Contact @ 9694473047


DBMS DPP PART - 4 BY-SUNIL YADAV SIR 2

e INTEGER, (c) The number of children of any two


PRIMARY KEY (d), non-leaf sibling nodes differ by at
FOREIGN KEY (a) references R) most 1.
Which one of the following (d) The number of records in any two
statements is CORRECT? leaf nodes differ by at most 1.
(a) S1 is TRUE and S2 is FALSE. 9. SELECT operation in SQL is
(b) Both S1 and S2 are TRUE. equivalent to
(c) S1 is FALSE and S2 is TRUE. (a) The selection operation in
(d) Both S1 and S2 are FALSE. relational algebra
6. Consider the following relation (b) The selection operation in
Cinema (theatre, address, capacity) relational algebra, except that
Which of the following options will SELECT in SQL retains
be needed at the end of the SQL duplicates
query (c) The projection operation in
SELECT P1. Address relational algebra
FROM Cinema P1 (d) The projection operation in
Such that it always finds the relational algebra, except that
addresses of theaters with SELECT in SQL retains
maximum capacity? duplicates
(a) WHERE P1. Capacity>=ALL (Select 10. The employee salary should not be
P2. Capacity from Cinema P2) greater than Rs. 2000. This is
(b) WHERE P1.capacity>=Any(select (a) Integrity constraint
P2.capacity from Cinema P2) (b) Referential constraint
(c) WHERE P1.capacity>All(select max (c) Over-defined constraint
(P2.capacity) from Cinema P2) (d) Feasible constraint
(d) WHERE P1.capacity>All(select max 11. In a database system, the domain
(P2.capacity) from Cinema P2) integrity is not defined by:
7. S1: Every table with two single- (a) The data type and the length
valued attributes is in 1NF, 2NF, (b) The NULL value rejection
3NF and BCNF. (c) The allowable values, through
S2: AB->C, D->E, E->C is a minimal techniques like constraints or
cover for the set of functional rules
dependencies (d) Default value.
AB->C, D->E, AB->E, E->C. 12. The primary key is selected from
Which one the following is the:
CORRECT? (a) Composite keys
(a) S1 is TRUE and S2 is FALSE (b) Determinants
(b) Both S1 and S2 are TRUE. (c) Candidate keys
(c) S1 is FALSE and S2 is TRUE. (d) Foreign keys
(d) Both S1 and S2 are FALSE 13. In functional dependency between
8. B+ Trees are considered BALANCED two sets of attribute A and B then
because set of attributes A of database is
(a) The lengths of the paths from the classified as:
root to all leaf nodes are all equal. (a) Top right side
(b) The lengths of the paths from the (b) Down left side
root to all leaf nodes differ from (c) Left hand side
each other by at most 1. (d) Right hand side

Join RPSC Programmer Offline/Online Batch Contact @ 9694473047


DBMS DPP PART - 4 BY-SUNIL YADAV SIR 3

14. Which of the following is a 19. Consider the following relations A,


fundamental operation in B, C.
relational algebra?
(a) Set intersection
(b) Assignment
(c) Natural Join
(d) None of the above
15. Consider the following table

The table is in which normal form?


(a) First Normal Form
(b) Second Normal Form
(c) Third Normal Form but not BCNF
(d) Third Normal Form but BCNF
16. The join operation can be defined
as
(a) A Cartesian product of two
relations followed by a selection
(b) A Cartesian product of two
relations
(c) A union of two relations followed
by Cartesian product of the two
relations How many tuples does the result of
(d) A union of two relations the following SQL query contain?
17. Given relations R(w, x) and S(y, z), SELECT A.id
the result of SELECT DISTINCT w, FROM A
x FROM R, S is guaranteed to be WHERE A.age > ALL (SELECT B.age
the same as R, if FROM B
(a) R has no duplicates and S is non- WHERE B. name = “arun”)
empty (a) 4 (b) 3
(b) R and S have no duplicates (c) 0 (d) 1
(c) S has no duplicates and R is non- 20. State whether TRUE or FALSE
empty (i) Secondary index cannot be
(d) R and S have the same number of defined on key attribute values
tuples (ii) In B+ tree indexing the non-leaf
18. Normalization from which is based nodes contain the actual data
on transitive dependency is pointers
classified as: (a) (i)-False, (ii)-True
(a) First normal form (b) (i)-True, (ii)- True
(b) Second normal form (c) (i)-False, (ii)-False
(c) Fourth normal form (d) (i)–True, (ii)-False
(d) Third normal form

Join RPSC Programmer Offline/Online Batch Contact @ 9694473047

You might also like