You are on page 1of 3

4.

96 | Unit 4  •  Databases

Test

Databases Time: 60 min.


1. Which of the following are used in DBMS files? (A) (i) only (B) (i) and (iii)
(i) Data dictionary (ii) DML (C) (i), (ii) and (iii) (D) (iii) and (iv)
(iii) Query language (iv) Transaction log 8. In which of the following, the structure of data files is
(A) (i) and (ii) (B) (ii) and (iii) stored?
(C) (iii) and (iv) (D) (i) and (iv) (A) Metadata (B) Database catalog
2. Which among the following is not a problem of file (C) Database schema (D) Data model
management system? 9. A schedule is a collection of
(A) Data redundancy (A) Data models (B) Transactions
(B) Lack of data independence (C) Schemas (D) Tables
(C) Program independence
10. Select from the following which matches the term
(D) None of these
‘Impedance mismatch problem’:
3. A transparent DBMS (A) In compatibility of storage and data structure
(A) cannot hide sensitive information from users (B) Mismatch in user authentication
(B) keeps its logical structure hidden from users (C) File structure mismatching
(C) keeps its physical structure hidden from users (D) None of these
(D) All of the above
11. Which of the following is not a/an integrity constraint?
4. If the field size is too small, for the longest piece of data (A) Entity integrity
to be entered, (B) Candidate key constraint
(A) database program will be freezed (C) Business rules
(B) field will automatically expand (D) None of the above
(C) part of the data will be cut off
(D) All of the above 12. Select from the following which is concerned with
‘Query Optimizer’:
5. Which of the following functional dependencies are (A)  Extracts DML commands from an application
satisfied by the instance from the below relation? program in a high-level language
A B C (B) Parsing and analyzing interactive query
1 7 3 (C) Rearrangement and reordering of operations and
1 9 5 elimination of redundancies
1 11 5 (D) Performance monitoring
5 3 3 13. Which of the following does not belong to database
(A) AB → C and C → B model?
(B) BC → A and B → C (A) Relational Model (B) Distributed Model
(C) BC → A and A → C (C) Hierarchical Model (D) Network Model
(D) AC → B and B → A 14. What is the correct sequence of database design
6. Let E1 and E2 be two entities in an E/R diagram with process?
single-valued attributes, R1 and R2 are two relationships (i) Create conceptual schema
between E1 and E2, R1 is one to many R2 is many-to-one. (ii) Data model mapping
R1 and R2 do not have any attributes of their own. What (iii) Requirement collection and analysis
is the minimum number of tables required to represent (iv) Physical design
this situation in the relation model? (A) iii →i →ii → iv
(A) 2 (B) 3 (B) iii → ii → i → iv
(C) 4 (D) 5 (C) i → ii → iii → iv
7. Which of the following is true about DBMS? (D) i → iii → ii → iv
(i) Low-level DMLs are record-at-a time 1 5. Consider the following schema definitions
(ii) High-level DMLs are set oriented or set-at-a time Employee {Name, SSN, Address, DNo}
(iii) Query in high-level DML specify which data to Department {DName, DNumber, Manager, SSN}
retrieve rather than how. Which among the following expressions represent the
(iv) When used as standalone, DML is called ‘host query ∏name, address(σDname = ‘Res’ ∧ DNumber = DNo (Department
language’  Employee)?
Test  |  4.97

(A) Retrieve the name and address of employees who π a1 , a2 ... an σ P ( r1 ∪ r2 ∪×…× ∪rm )
(C)
work for the project no ‘Dno’
(B) Retrieve the name and address of all employees π a1 , a2 ... an σ P ( r1r2 ×…× rm )
(D)
who control the ‘Res’ department.
(C) Retrieve the name and address of all employees 20. Let R1­(A, B, C) and R2(D, E) be two relation schemas
who work for the ‘Res’ department. with primary keys A and D and C be a foreign key in
(D) None of these R1 referring to R2. Suppose there is no violation of the
above referential integrity constraint in the instances r1
16. Select from the following which closely resembles the and r2, which of the following relational algebra expres-
concept ‘Degree of a relationship’: sion would necessarily produce an empty relation?
(A) Number of entities participating in a relation (A) pD(r2) - pC(r1)
(B) Number of entity types participating in a relation (B) pC(r1) - pE(r2)
(C) Number of strong entity types in a relation (C) pD(r1  C = D r2) - pB(r1)
(D) Number of weak entity types in a relation (D) pC(r1  C = E r2)
7. Consider the following statements in a database:
1 21. Let r be an instance for the schema R = (A, B, C, D). Let
(i) No primary key value can be NULL r1 = π A, B , C ( r )r2 = π A, D ( r ) and S = r1  r2. Also given
(ii) A tuple in one relation which refers to another re- that the decomposition of r into r1 and r2 is lossy, which
lation must refer to an existing tuple in that rela- of the following is true?
tion (A) S ⊂ r (B) r∪s=r
(iii) The value of x determines the value of y in all (C) r ⊂ s (D) r  s = s
states of a relation, where x and y are two attrib-
utes of the relation Which of the following combi- 22. Which of the following is/are logical database
nations matches the given statements in order? structures?
(A) Referential integrity, functional dependency, en- (A) Network (B) Tree
tity integrity. (C) Chain (D) All of the above
(B) Functional dependency, entity integrity, referential 23. A relational database management system manages
integrity data in more than one file at a time by using which of
(C) Entity integrity, functional dependency, referential the following combinations?
integrity. (A) Tables and tuples
(D)  Entity integrity, referential integrity, functional (B) Relations and tuples
dependency (C) Tables and Relations
8.
1 Consider the following relation schemas: (D) Attributes and tuples
Works (emp_name, comp_name,salary) 24. Let Emp = (Name, ID, ADDRESS, PHONE, SPOUSE,
Livesin (emp_name, street, city) LIVINGAT) be a relation scheme with following FDs,
which one of the following is a key
Location (comp_name, city)
ADDRESS → Phone
Manager (manager_name) SPOUSE → NAME
What is returned by the following relational algebra SPOUSE, ADDRESS → PHONE
expression NAME → ID
π emp _ name (σ comp − name = Time ∧ Works.emp _ name = live sin . emp _ name ) (A) ADDRESS, PHONE
(B) SPOUSE, ADDRESS
(Works   Livesin) (C) NAME, SPOUSE
(A) Names of all employees who work for TIME (D) NAME, ADDRESS
(B) Names of all employees of TIME who lives in the
25. Consider the following E-R diagram
same city
(C) Names of people who live in the same city
Sname Quantity Proj_name
(D) None of these
9. Consider the following SQL query:
1
SUPPLIER SUPPLY PROJECT
Select distinct a1, a2, …, an from r1, r2…rm where P
This query is equivalent to one of the following rela- Part_no
tional algebra expression: PART
(A) π a , a ... a σ P (r1 × r2 × ... × rm )
1 2 n
Select the most appropriate statement from the follow-
π a1 , a2 ... an σ P ( r1r2 ×…× rm )
(B)
ing for the above ER diagram:
4.98 | Unit 4  •  Databases

(A) Represents a ternary relationship 28. What does the following relational algebra expression
(B) Represents a binary relationship represent?
(C) Represents a ternary relationship with instances of pid ( pid­, mob_no(Employee-Guests))
the form (s, j, p) (A) Id of all employees working with the company
(D) Represents 1 – to – many relationships (B) Id of all permanent employees
26. If two relations R1 and R2 are such that they are of the (C) Id of part time employees
same degree and domain of the corresponding fields (D) None of these
are also the same, then which one of the following is Common data for questions 29 and 30:
true about R1 and R2?
29. Let R1 and R2 be two relations with attributes a1 and a2.
(A) R1 ⊂ R2 P1 and P2 be two predicates.
(B) R1 ∪R2 = R2 ∪ R1
 Select the expression from the following which is
(C) R1 and R2 are union compatible
wrong:
(D) None of these
σ P1 (σ P1 ( R1 )) → σ P2 (σ P2 ( R1 ))
(A)
Common data questions for 27 and 28:  Let Employee σ P1 (π a1 ( R1 )) → π (σ a1 (σ P1 ( R1 )))
and Guests be two relations with attributes (id, mobl_no, (B)
σ P1 ( R1 ∪ R2 ) → σ P1 ( R1 ) ∪ σ P2 ( R2 )
(C)
name, address) and (id, mob–no, comps_working, shifts)
Relations respectively {id, mob_no} is the key for both. π a2 (σ a1 ( R1 )) → σ P1 (π a2 ( R1 ))
(D)
27. Which of the following queries are equivalent? 30. Select from the following corresponding TRC for the
(i) pid (Employee  Guests) wrong expression in the above question:
(ii) pid (Employee)  pid(Guests)
(A) {t/ ∃u, R1(t[P1]) = R2(u[P1])}
(iii) pid{(Employee-Guest) ∩ Guest-Employee)}
(B) {t/ u, R1(t[P1]) = R1(u[P1])}
A
(iv) pid { pid, mob (Employee) ∩ pid, mob (Guest)}
(A) (ii) and (iii) (B) (ii), (iii) and (iv) (C) {t/ ∃u, R1(t[P1]) ≠ R2(u([P1])}
(C) (i), (ii) and (iv) (D) (ii) and (iv) only (D) {t/‫(ד‬t∈R1)}

Answer Keys
1. D 2. D 3. C 4. C 5. B 6. B 7. C 8. B 9. B 10. A
11. B 12. C 13. B 14. A 15. C 16. A 17. D 18. C 19. A 20. A
21. C 22. D 23. C 24. B 25. C 26. C 27. C 28. B 29. A 30. B

You might also like