Database MCQ - ER-model & Relational Model

66:  

 It is desired to design an object-oriented employee record system for a company. Each employee has a name, unique id and salary. Employees belong to diferent categories and their salary is determined by their category. The functions geName, getld and compute Salary are required. Given the class hierachy below, possible locations for these functions are:
(i) getld is implemented in the superclass
(ii) getld is implemented in the subclass
(iii) getName is an abstract funciton in the superclass
(iv) getName is implemented in the superclass.
(v)  getName is implemented in the subclass
(vi) getSalary is an abstract function in the superclas
(vii) getSalary is implemented in the superclass
(viii) getSalary is implemented in the subclass.

Choose the best design


2118
A.

(i), (iv), (vi), (viii)

B.

(i), (iv), (vii)

C.

(i), (iii), (v), (vi), (viii)

D.

(ii) , (v) , (viii)

 
 

Option: A

Explanation :

Click on Discuss to view users comments.

Write your comments here:



67:  

 Let r be a relation instance with schema R = (A, B, C, D). We define r1 =∏ A,B,C (r) and r2 = ∏A, D (r)
Let S = r1* r2  where * denotes natural join. Given that the decomposition of r into r1 and r2 is lossy, which one of the following is TRUE?

A.

S ⊂ r

B.

r ∪ s  =  r

C.

r ⊂ s

D.

r*s = s

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



68:  

 Let E1 and E2 be two entities in an E/R diagram with simple single-valued attributes. R1 and R2 are two relationships between E1 and E2, where R1 is one-to-many and R2 is many-to-many. RI and R2 do not have any attributes of their own. What is the minimum number of tables required to represent this situation in the relational model?

A.

2

B.

3

C.

4

D.

5

 
 

Option: B

Explanation :

Click on Discuss to view users comments.

Write your comments here:



Related MCQ