MCQOPTIONS
Saved Bookmarks
This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Empdt1(empcode, name, street, city, state,pincode).For any pincode, there is only one city and state. Also, for given street, city and state, there is just one pincode. In normalization terms, empdt1 is a relation in |
| A. | 1 NF only |
| B. | 2 NF and hence also in 1 NF |
| C. | 3NF and hence also in 2NF and 1NF |
| D. | BCNF and hence also in 3NF, 2NF and 1NF |
| Answer» C. 3NF and hence also in 2NF and 1NF | |
| 2. |
The relation employee(ID,name,street,Credit,street,city,salary) is decomposed intoemployee1 (ID, name)employee2 (name, street, city, salary)This type of decomposition is called |
| A. | Lossless decomposition |
| B. | Lossless-join decomposition |
| C. | Both a and b |
| D. | None of the mentioned |
| Answer» E. | |
| 3. |
Inst_dept (ID, name, salary, dept name, building, budget) is decomposed intoinstructor (ID, name, dept name, salary)department (dept name, building, budget)This comes under |
| A. | Lossy-join decomposition |
| B. | Lossy decomposition |
| C. | Lossless-join decomposition |
| D. | Both a and b |
| Answer» E. | |
| 4. |
There are two functional dependencies with the same set of attributes on the left side of the arrow:A->BCA->BThis can be combined as |
| A. | A->BC |
| B. | A->B |
| C. | B->C |
| D. | None of the mentioned |
| Answer» B. A->B | |
| 5. |
Consider a relation R(A,B,C,D,E) with the following functional dependencies:ABC -> DE andD -> ABThe number of superkeys of R is: |
| A. | 2 |
| B. | 7 |
| C. | 10 |
| D. | 12 |
| Answer» D. 12 | |
| 6. |
Suppose we wish to find the ID s of the employees that are managed by people who are managed by the employee with ID 123. Here are two possible queries:I.SELECT ee.empID FROM Emps ee, Emps ff WHERE ee.mgrID = ff.empID AND ff.mgrID = 123;II.SELECT empID FROM Emps WHERE mgrID IN (SELECT empID FROM Emps WHERE mgrID = 123);Which, if any, of the two queries above will correctly (in SQL2) get the desired set of employee ID s? |
| A. | Both I and II |
| B. | I only |
| C. | II only |
| D. | Neither I nor I |
| Answer» B. I only | |
| 7. |
Suppose relation R(A,B) currently has tuples {(1,2), (1,3), (3,4)} and relation S(B,C) currently has {(2,5), (4,6), (7,8)}. Then the number of tuples in the result of the SQL query:SELECT * FROM R NATURAL OUTER JOIN S; |
| A. | 2 |
| B. | 4 |
| C. | 6 |
| D. | None of the mentioned |
| Answer» B. 4 | |
| 8. |
Suppose now that R(A,B) and S(A,B) are two relations with r and s tuples, respectively (again, not necessarily distinct). If m is the number of (not necessarily distinct) tuples in the result of the SQL query: R intersect S;Then which of the following is the most restrictive, correct condition on the value of m? |
| A. | M = min(r,s) |
| B. | 0 <= m <= r + s |
| C. | Min(r,s) <= m <= max(r,s) |
| D. | 0 <= m <= min(r,s) |
| Answer» E. | |