Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

1. Which of the following is TRUE?

(A) Every relation in 3NF is also in BCNF


(B) A relation R is in 3NF if every non-prime attribute of R is fully functionally
dependent on every
key of R
(C) Every relation in BCNF is also in 3NF
(D) No relation can be in both BCNF and 3NF

2. Consider a relational table with a single record for each registered student with
the following attributes.
1. Registration_Num: Unique registration number
of each registered student
2. UID: Unique identity number, unique at the
national level for each citizen
3. BankAccount_Num: Unique account number at
the bank. A student can have multiple accounts
or join accounts. This attribute stores the
primary account number.
4. Name: Name of the student
5. Hostel_Room: Room number of the hostel
Which one of the following option is INCORRECT?
(A) BankAccount_Num is candidate key
(B) Registration_Num can be a primary key
(C) UID is candidate key if all students are from the same country
(D) If S is a superkey such that S∩UID is NULL then S∪UID is also a superkey

3. Given the STUDENTS relation as shown below.

For (StudentName, StudentAge) to be the key for this instance, the value X should
not be equal to
(A) 18
(B) 19

4. Given the basic ER and relational models, which of the following is INCORRECT?
(A) An attribute of an entity can have more than one value
(B) An attribute of an entity can be composite
(C) In a row of a relational table, an attribute can have more than one value
(D) In a row of a relational table, an attribute can have exactly one value or a NULL
value

5. Consider the data given in above question. Which of the following is a correct
attribute set for one of the tables for the correct answer to the above question?

(A) {M1, M2, M3, P1}


(B) {M1, P1, N1, N2}
(C) {M1, P1, N1}
(D) {M1, P1}

6. Given the basic ER and relational models, which of the following is INCORRECT?
(A) An attribute of an entity can have more than one value
(B) An attribute of an entity can be composite
(C) In a row of a relational table, an attribute can have more than one value
(D) In a row of a relational table, an attribute can have exactly one value or a NULL
value

7. Table A
Id Name Age
----------------
12 Arun 60
15 Shreya 24
99 Rohit 11

Table B
Id Name Age
----------------
15 Shreya 24
25 Hari 40
98 Rohit 20
99 Rohit 11

Table C
Id Phone Area
-----------------
10 2200 02
99 2100 01
Consider the above tables A, B and C. How many tuples does the result of the
following SQL query contains?
SELECT A.id
FROM A
WHERE A.age > ALL (SELECT B.age
FROM B
WHERE B. name = "arun")
(A) 4
(B) 3
(C) 0
(D) 1
7. SQL allows tuples in relations, and correspondingly defines the multiplicity of
tuples in the result of joins. Which one of the following queries always gives the
same answer as the nested query shown below:
select * from R where a in (select S.a from S)
(A) select R.* from R, S where R.a=S.a
(D)
(B) select distinct R.* from R,S where R.a=S.a
(C) select R.* from R,(select distinct a from S) as S1 where
R.a=S1.a
(D) select R.* from R,S where R.a=S.a and is unique R

You might also like