Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DBMS Question Bank PDF

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

Anekant Education Society’s

Tuljaram Chaturchand College of Arts, Science & Commerce, Baramati


Department of BBA (C.A)
FYBBA (C.A) (Semester - II)
Question Bank
DATABASE MANAGEMENT SYSTEM [1202]

Q 1 A] Fill in the blanks.


1) A characteristic of an entity.
a) Relation
b) Attribute
c) Parameter
d) Constraint

2) Key to represent the relationship between tables is called


a) Primary key
b) Secondary Key
c) Foreign Key
d) None of these

3) The full form of DDL is


a) Dynamic Data Language
b) Detailed Data Language
c) Data Definition Language
d) Data Derivation Language

4) Which of the following is a legal expression in SQL?


a) SELECT NULL FROM EMPLOYEE;
b) SELECT NAME FROM EMPLOYEE;
c) SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL;
d) None of the above

5) What is an ACID property of Transactions?


a) Atomicity, Consistency, Isolation, Database
b) Atomicity, Consistency, Isolation, Durability
c) Atomicity, Consistency, Inconsistent, Durability
d) Automatically, Concurrency, Isolation, Durability
6) Which of the following is not a built in aggregate function in SQL?
a) avg
b) max
c) total
d) count

7) Which of the following set operations is not commutative?


a) Union
b) Intersection
c) Set difference
d) None of the mentioned

8) Which of the following is a property of transactions?


a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned

9) How can we insert data into a view?


a) insert into ();
b) create data values ();
c) enter ();
d) insert into values ();

10) Which of the following is not a method in deadlock handling


a) Deadlock prevention
b) Deadlock detection
c) Deadlock recovery
d) Deadlock distribution

11) The process of designating sub groupings within the entity set is called as _______
a) Specialization
b) Division
c) Aggregation
d) Finalization

12) A schedule is __________ if it is conflict equivalent to a serial schedule.


a) Conflict serializable
b) Conflicting
c) Non serializable
d) None of the mentioned

13) _____________ Function divides one numeric expression by another and returns the remainder.
a) POWER
b) MOD
c) ROUND
d) REMAINDER

14) A system is in a _______ state if there exists a set of transactions in which every transaction is
waiting for another transaction in the set.
a) Deadlock
b) Starved
c) Isolated
d) None of the mentioned

15) If a transaction has obtained a __________ lock, it can read but cannot write on the item
a) Shared mode
b) Exclusive mode
c) Read only mode
d) Write only mode

16) If a transaction has obtained a ________ lock, it can both read and write on the item
a) Shared mode
b) Exclusive mode
c) Read only mode
d) Write only mode

17) Which of the following commands do we use to delete a relation (R) from a database?
a) drop table R
b) drop relation R
c) delete table R
d) delete from R

18) Which of the following data types does the SQL standard not support?
a) char(n)
b) String(n)
c) varchar(n)
d) float(n)

19) The _______ statement causes the statements to undo all the updates performed on the transaction
a) Undo work
b) Rollback work
c) Commit work
d) Replace work

20) In the __________ normal form, a composite attribute is converted to individual attributes.
a) First
b) Second
c) Third
d) Fourth
Q 2.Answer in one sentence:
1) Relation
2) Cardinality
3) DBMS
4) Information
5) Primary Key
6) Super Key
7) Foreign Key
8) Domain
9) Count
10) ORDER By
11) Group By
12) AVG
13) Deadlock
14) Growing Phase
15) Shrinking Phase
16) Starvation
17) Commit
18) Rollback
19) Redo
20) Undo
Q 3. Write Short Notes on:
1) Extended Features of ERD
2) Generalization
3) Views of DBMS
4) Structure of DBMS
5) Terms
6) Keys
7) Normalization
8) Anomalies un-normalized Database
9) DDL Command
10) DML Command
11) Aggregation Function
12) Concurrent Execution
13) ACID Properties
14) Serializability
15) Deadlock
16) Two Phase Protocol
17) Checkpoint
18) Storage Types
19) Types of Failure
20) Log-Based Recovery
Q 4. Give answers of following in Short.
1) Explain Application of DBMS
2) What are the advantages of DBMS?
3) List various users of DBMS and specify the roles?
4) What is aggregation? Explain with example?
5) Explain Select and Intersection operation of Relational Algebra with example.
6) Explain Project and Union operation of Relational Algebra with example.
7) Consider the following Relational Database.
Student (roll_no, name,city,marks,c_no)
Course (c_no,cname,fees)
Construct Queries into Relational algebra.
a) List Student Details enrolled for ‘BBA (C.A)’ Course.
b) List the Course having fees < 20000
c) Display all students living in either ‘Nasik’ or ‘Pune’ city.
d) Display Course detail for student ‘Gaurav Sharma’.

8) Consider the following Relational Database.


Doctor (dno, dname,address,dcity)
Hospital (hno,hname,street,hcity)
Dochosp (dno,hno,date)
Construct Queries into Relational algebra.
a) Find hospital names to which ‘Dr. Mehata’ has visited.
b) Find out all the doctors who have visited hospitals in the same city.
c) List all the doctors who visited ‘Krishna’ on ‘1-1-19’. .
d) List Name of hospital to which ‘Dr. Aman’ has visited on ‘5-3-2019’
9) List various DDL commands. Explain any one with example.
10) Explain Aggregate functions with example.
11) Explain GROUPBY Clause with example.
12) Explain Normalization with an example.
13) Explain weak entity with example.
14) Differentiate between specialization and Generalization with an example.
15) Write a short note on extended features of ERD.
16) What is mean by Data Model? Explain relational Model.
17) What is mean by Relational Algebra? List out the relational Algebra operation with its example.
18) What is Deadlock? How to prevent Deadlock?
19) What are strong and weak entities?
20) Following is list of events in an interleaved execution of set T1, T2, T3 and T4 assuming 2PL .IS
there a Deadlock? If yes, which transaction are involved in Deadlock?
Time Transaction Code
T1 T1 LOCK (A, X)
T2 T2 LOCK (B, X)
T3 T3 LOCK (A, S)
T4 T4 LOCK (B, S)
T5 T1 LOCK (B, S)
T6 T2 LOCK (D, X)
T7 T3 LOCK (D, S)
T8 T4 LOCK (C, X)
Q 5. Give answers of following in Long.
1) Explain Overall structure of DBMS in brief.
2) What is an Attribute? Explain its Types.
3) List various DML Commands. Explain any one with example.
4) List various Aggregate functions. Explain any one with example.
5) Discuss anomalies of un-normalized database.
6) What is mean by key? Explain its types.
7) Explain two phase locking protocol with example.
8) What is deadlock? Explain deadlock detection method.
9) Following is the list of events in an interleaved execution is set T1, T2, T3 assuming 2PL.is there
a deadlock? If yes, which transactions are involved in deadlock?
Time Transaction Code
T1 T1 Lock (A, X)
T2 T2 Lock (B, S)
T3 T3 Lock (A, S)
T4 T1 Lock (C, X)
T5 T2 Lock (D, X)
T6 T1 Lock (D, S)
T7 T2 Lock (C, S)

10) Explain Log-based Recover.


11) Explain various types of failure that may occur in a system.
12) Explain deferred database Modification technique with example.
13) Explain the Natural join and Cartesian product with example.
14) Following are the log entries at the time of system crash.
[start_transaction, T1]
[Write _item, T1, A, 30]
[Commit T1]
[Checkpoint]
[start_transaction, T3]
[Write _item, T3, C, 50]
[Commit T3]
[start_transaction, T2]
[Write _item, T2, C, 40]
[start_transaction, T4]
[Write _item, T4, B, 30]
[Write _item, T2, D, 60] System Crash
If deferred update technique with checkpoint is used, what will be the recovery procedure?

15) Following are the log entries at the time of system crash.
[start_transaction, T1]
[Write _item, T1, A, 5]
[Commit T1]
[start_transaction, T2]
[Write _item, T2, B, 10]
[Write _item, T2, D, 15]
[Commit T2]
[Checkpoint]
[start_transaction, T3]
[Write _item, T3, B, 20]
[start_transaction, T4]
[Write _item, T4, C, 10] System Crash
If deferred update technique with checkpoint is used, what will be the recovery procedure?
16) Consider the following Relational Database.
Doctor (dno, dname, dcity)
Patient (opdno, pat_name,addr,disease)
The relation between patient and Doctor is many to many.
Create a RBD in 3NF and solve any five of the following.
i. Insert a row in Doctor Table.
ii. Find names of patient who are treated by ‘Dr. Deshpande.
iii. Display names of doctors who live in ‘Pune’ city.
iv. Count number of patients suffering from ‘Cancer’.
v. Add ‘Discharge Date’ Column to patient table.
vi. Display total no. of patients treated by each doctor.

17) Consider the following entities and relationships.


Item (I_no, I_name, I_qty)
Po (P_no, P_date)
Supplier (S_no, S_name, S_addr)
Item and Po are related with one to many relationships along with descriptive cost and quantity.
Supplier and Po are related with one-to-many relationships.
Create a RDB for theabove and solve thefollowing queries :
i. Insert a row in Item table.
ii. List the name of supplier to whom Pois given for “mouse”.
iii. List the name of supplier and item_name in Po’s generated on “30-sep-2009”.
iv. List the names of suppliers who is going to supply “monitor” with minimum cost.
v. Find out Po number, Po date and supplier name of the Po which is of maximum amount.
vi. Display all Po which contains the number, date, supplier name of the Po details of all items
included in that i.e. name of item, qty and rate.
18) A Company has several departments. Each department has a supervisor and at least one
employee. Employee must be assigned to at least one, but possibly more department
i. Identify all entities
ii. Identify all relations.
iii. Draw E-R Diagram.
19) A Company has several employees. At least one employee is assigned to a project, but an
employee may be on vacation and not assigned to any projects. A database should provide
following details to the user
i. Identify all entities
ii. Identify all relations.
iii. Draw E-R Diagram.

20) Consider relational database:


Supplier (Supno, sname, supaddress)
Item (Itemno, Iname, stock)
Supp-Item (Supno, Itemno, rate)
Write relational algebraic expression for the following
i. List all suppliers from ‘Varanasi’ city who supplies PISTON.
ii. Display all suppliers supply PISTON RINGS
iii. Change supplier names to upper case
iv. List all suppliers supplying DOOR Lock from ‘Jaipur’ city

You might also like