A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

51. Consider the following two commands C1 and C2 on the relation R from an SQL database:
C1: drop table R;
C2: delete from R;
Which of the following statements is TRUE?
I. Both C1 and C2 delete the schema for R.
II. C2 retains relation R, but deletes all tuples in R.
III. C1 deletes not only all tuples of R, but also the schema for R.
a. I only
b. I and II only
c. II and III only
d. I, II and III
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).II and III only

52. Consider the following database table having A, B, C and D as its four attributes and four possible candidate keys (I, II, III and IV) for this table:
A B C D
a1 b1 c1 d1
a2 b3 c3 d1
a1 b2 c1 d2

I: {B} II: {B, C} III: {A, D} IV: {C, D}
If different symbols stand for different values in the table (e.g., d1 is definitely not equal to d2), then which of the above could not be the candidate key for the database table?
a. I and III only
b. III and IV only
c. II only
d. I only
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).II only

53. An attribute A of datatype varchar(20) has value 'Ram' and the attribute B of datatype char(20) has value 'Sita' in oracle. The attribute A has .......... memory spaces and B has .......... memory spaces.
a. 20, 20
b. 3, 20
c. 3, 4
d. 20, 4
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).3, 20

54. Integrity constraints ensure that changes made to the database by authorized users do not result into loss of data consistency. Which of the following statement(s) is (are) true w.r.t. the examples of integrity constraints?

(A) An instructor Id. No. cannot be null, provided Instructor Id. No. being primary key.
(B) No two citizens have same Adhar-Id.
(C) Budget of a company must be zero.
a. (A), (B) and (C) are true
b. (A) false, (B) and (C) are true
c. (A) and (B) are true; (C) false
d. (A), (B) and (C) are false
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).(A) and (B) are true; (C) false

55. Let M and N be two entities in an E-R diagram with simple single valued attributes. R1 and R2 are two relationships between M and N, whereas
R1 is one-to-many and R2 is many-to-many.
The minimum number of tables required to represent M, N, R1 and R2 in the relational model are ..........
a. 4
b. 6
c. 7
d. 3
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).3

56. Consider a schema R(MNPQ) and functional dependencies M→N, P→Q. Then the decomposition of R into R1(MN) and R2(PQ) is _______
a. Dependency preserving but not lossless join
b. Dependency preserving and lossless join
c. Lossless join but not dependency preserving
d. Neither dependency preserving nor lossless join
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Dependency preserving but not lossless join

57. If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m, where n?m, the expected number of collisions involving a particular key x is less than ...................
a. 1
b. 1/n
c. 1/m
d. n/m
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).1

58. Which one is correct w.r.t. RDBMS?
a. primary key ⊆ super key ⊆ candidate key
b. primary key ⊆ candidate key ⊆ super key
c. super key ⊆ candidate key ⊆ primary key
d. super key ⊆ primary key ⊆ candidate key
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).primary key ⊆ candidate key ⊆ super key

59. Let pk(R) denotes primary key of relation R. A many-to-one relationship that exists between two relations R1 and R2 can be expressed as follows:
a. pk(R2)→pk(R1)
b. pk(R1)→pk(R2)
c. pk(R2)→R1∩R2
d. pk(R1)→R1∩R2
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).pk(R1)→pk(R2)

60. For a database relation R(A,B,C,D) where the domains of A,B,C and D include only atomic values, only the following functional dependencies and those that can be inferred from them are:
A→C
B→D
The relation R is in ................
a. First normal form but not in second normal form
b. Both in first normal form as well as in second normal form
c. Second normal form but not in third normal form
d. Both in second normal form as well as in third normal form
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).First normal form but not in second normal form

Page 6 of 23