Database miscellaneous
- Which one of the following is not logically equivalent to ̚ ∃x (∀ y (α) ∧ ∀ z (β) ) ?
-
View Hint View Answer Discuss in Forum
∀ ×(∃z(̚β) &rarrr; ∀ y(α)) and ∀ ×(∃y(̚α) &rarrr; ∃z(β)) both are NOT logically equivalent to
̚∃ × (∀y(α) ∧ ∀z(β)Correct Option: A
∀ ×(∃z(̚β) &rarrr; ∀ y(α)) and ∀ ×(∃y(̚α) &rarrr; ∃z(β)) both are NOT logically equivalent to
̚∃ × (∀y(α) ∧ ∀z(β)
- Given an instance of the STUDENTS relation as shown below :
For (StudentName, StudentAge) to be a key for this instance, the value X should NOT be equal to _____________ .
-
View Hint View Answer Discuss in Forum
Age cannot be 19 as (Student Name, Student Age) is a key.
Correct Option: A
Age cannot be 19 as (Student Name, Student Age) is a key.
- The maximum number of superkeys for the relation schema R(E, F, G, H) with E as the key is _____.
-
View Hint View Answer Discuss in Forum
Maximum no. of super keys = 2n – 1 = 24 – 1 = 23 = 8
Correct Option: C
Maximum no. of super keys = 2n – 1 = 24 – 1 = 23 = 8
- What is the optimized version of the relation algebra expression πA1(πA2 (σF1 (σF2(r)))) , where A1, A2 are sets of attributes in r with A1 ⊂ A2 and F1, F2 are Boolean expressions based on the attributes in r?
-
View Hint View Answer Discuss in Forum
ΠA1 (ΠA2 (σF1 (σF1 (r))))
= ΠA1 (ΠA2 (σ (F1 ∧ F2)(r)))
∴ A1 ⊂ A2 , final relation will be displaying values for attributes present in set A.
ΠA1 (σ (F1 ∧ F2)(r))Correct Option: A
ΠA1 (ΠA2 (σF1 (σF1 (r))))
= ΠA1 (ΠA2 (σ (F1 ∧ F2)(r)))
∴ A1 ⊂ A2 , final relation will be displaying values for attributes present in set A.
ΠA1 (σ (F1 ∧ F2)(r))
- Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation. employee (empId, empName, empAge) dependent(depId, eId, depName, depAge) Consider the following relational algebra query :
ΠempId (employee)- ΠempId (employee|X| (empId = eID)^.(empAge. depAge)dependent)
The above query evaluates to the set of empIds of employees whose age is greater than that of
-
View Hint View Answer Discuss in Forum
A gives the set of empIds of those employees whose age is less than or equal to the age of some of his/her dependents. Set of empIds of all employees - set of empIds obtained from part A gives the set of empIds of employees whose age is greater than that of all of his/ her dependents.Correct Option: D
A gives the set of empIds of those employees whose age is less than or equal to the age of some of his/her dependents. Set of empIds of all employees - set of empIds obtained from part A gives the set of empIds of employees whose age is greater than that of all of his/ her dependents.