DBMS Possible Qset 5

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

1.

The ability to change the conceptual schema without affecting the external schemas is
known as …………………….
A. Data abstraction B. Logical data independence
C. Physical data independence D. Program data independence

2. A data model is a collection of conceptual tools for describing:


A. Data B. Data relationships and data semantics
C. Consistency constraints D. All of the above

3. An abstraction in which relationship sets are treated as higher-level entity sets, and can
participate in relationships is called……….
A. Mapping cardinalities B. Generalization
C. Aggregation D. Specialization

4. An identifying set is a ................... from the weak entity set to the identifying entity set.
A. Many to one B. One to many C. One to one D. Many to many

5. Which of the following is TRUE regarding referential integrity?


A. Every foreign-key value must match a foreign-key value in an associated table
B. Every primary-key value must match a foreign-key value in an associated table
C. Every primary-key value must match a foreign-key value in an associated table
D. Every foreign-key value must match a primary-key value in an associated table.

6. The result of .................. operation is a relation that includes all tuples that are in both R
and S relations.
A. join B. minus C. union D. intersection

7. For each attribute of a relation, there is a set of permitted values, called the ............... of that
attribute.
A. Relation B. Set C. Domain D. Schema

8. Which of the following is TRUE?


A. A relation in 3NF is always in BCNF
B. A relation in BCNF is always in 3NF
C. BCNF and 3NF are totally different
D. A relation in BCNF is in 2NF but not in 3NF
9. Which of the following is NOT Constraint in SQL?
A. Not Null B. Union C. Check D. Primary Key

10. A command that change one or more field in a table is


A. MODIFY B. LOOK-UP C. INSERT D. All of the above

11. Find the cities name with the condition and temperature from table 'weather' where
condition = sunny or cloudy but temperature >= 60.
A. SELECT city, temperature, condition FROM weather WHERE condition = 'cloudy' OR
condition = 'sunny' OR temperature >= 60
B. SELECT city, temperature, condition FROM weather WHERE condition = 'cloudy'
AND condition = 'sunny' OR temperature >= 60
C. SELECT city, temperature, condition FROM weather WHERE condition = 'sunny'
AND condition = 'cloudy' AND temperature >= 60
D. SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR
condition = 'cloudy' AND temperature >= 60

12. Which of the following means that data used during the execution of a transaction cannot
be used by a second transaction until the first one is completed?
A. Isolation B. Atomicity C. Serializability D. Time stamping

13. Suppose relation R(A,B,C,D,E) has the following functional dependencies:


A→ B
B →C
BC→ A
A →D
E→ A
D→ E
Which of the following is NOT a key?
A. B,C B. A C. D D. E

14. If ................ , then A → B has trivial functional dependency


A. A is subset of B B. A is subset of A’
B. B is subset of A D. B is subset of B’

15. Which phase in a two-phase lock is when a transaction releases all locks and cannot obtain
any new lock?
A. Growing B. Shrinking C. Locking D. Unlocking

16. Which of the following occurs when one transaction reads a changed record that has not
been committed to the database?
A. Phantom read B. Dirty read
C. Non repeatable read D. Consistent read

17. Deferred update recovery policy leads to


A. Undo/Redo policy B. Undo/No-redo policy
C. No-undo/No-redo policy D. No-undo/Redo policy
18. When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if
it has a timestamp smaller than that of Tj (that is, Ti is older than Tj). Otherwise, Ti is
rolled back (dies). This is
A. Wait-die B. Wait C. Wait-wound D. Wound-wait

19. What is NoSQL database?


A. NoSQL is a database that is built with enhancement to DBMS.
B. NoSQL is a database that is an enhanced from of RDBMS
C. NoSQL is a database that is built on ways and means other than tables and columns
D. None of the above

20. NoSQL database is mainly for handling large volumes of .................. data.
A. Structured B. Semi-structured
C. Structured and semi-structured D. Unstructured
SECTION “B”

Attempt ANY SIX questions.

1. Write the advantages of DBMS approach over file system approach.


2. Why do we need join operation in SQL? Explain about different types of joins with suitable
example. [1+3]
3. Consider the following set of functional dependencies on the relation schema
r(A,B,C,D,E,F): [1+1+1+1]
A→BCD
BC→DE
B→D
D→A
a. Compute B+
b. Prove that AF is a super key.
c. Compute a canonical cover for the above set of functional dependencies F; give each
step of your derivation with an explanation.
d. Give a 3NF decomposition of r based on the canonical cover.

4. Discuss the ACID properties of a database transaction. Which of the following schedule
is conflict serializable? For each serializable determine the equivalent serial schedules.
[1+3]
i. r1(x);r3(x);w1(x);r2(x);w3(x);
ii. r1(x);r3(x);w3(x);w1(x);r2(x);
iii. r3(x);r2(x);r1(x);w3(x);w1(x);
5. Describe how lock based protocol ensure the management of concurrent transactions.
6. Discuss recovery technique base on deferred update.
7. Explain about the different types of NoSQL databases.

SECTION “B”

Attempt ALL question.

8. Difference between logical data independence and physical data independence. Design a
database for an airline that must keep track of customers and their reservations, flights and
their status, seat assignments on individual flights, and the schedule and routing of future
flights.
Your design should include an E-R diagram, a set of relational schemas, and a list of
constraints, including primary-key and foreign-key constraints. [3+5]
9. Mention the situations when you would choose RDBMS or NoSQL.
Consider the following employee database
Employee (employee_name, street, city)
Works (employee_Name, company_name, salary)
Company (company_name, city)
Manages (employee_name, manager_name)
a. Find the company that has the most employees.
b. Find the names, street addresses, and cities of residence of all employees who work
for “Rastra Bank” and earn more than Rs55000.
c. Find all employees in the database who do not work for “Rastra Bank”.
d. Find all employees in the database who earn more than each employee of “Banijya
Bank”
e. Assume that the companies may be located in several cities. Find all companies
located in every city in which “Banijya Bank” is located
For the above queries give an expression in SQL. [3+5]

You might also like