DBMS Old Ques Paper
DBMS Old Ques Paper
DBMS Old Ques Paper
Marks
Q.1 (a) What is Data Definition Language? List DDL statements and explain 03
anyone with an example.
(b) List and describe ACID property of transactions. 04
(c) Consider the relation R = {A, B, C, D, E, F, G, H, I, J} and the set of 07
functional dependencies
F={{A, B} → C, A → {D, E}, B → F, F →{G, H}, D →{I, J}}
What is the key for R? Decompose R into 2NF, then 3NF relations.
Q.2 (a) Differentiate shared lock and exclusive lock in lock-based protocol. 03
(b) Describe the Cartesian Product operation in relational algebra. 04
(c) Draw E-R diagram for student management system with the necessary 07
assumption.
OR
(c) Consider the relational database given below. Give an expression in the 07
relational algebra to express each of the following queries:
Employee (person-name, street, city),
Works (person-name, company-name, salary),
Company (company-name, city),
Manages (person-name, manager-name)
(1) Find name of all employees.
(2) Find city of employee whose name is ‘jashu’.
(3) Find name and city of all employees who are having salary>50000.
(4) Find total salary of all employees who are working for company
‘HCL’.
2
Seat No.: ________ Enrolment No.___________
Marks
Q.1 (a) Define following terms.
1) Schema 2) Database Management System 3) Physical Data 03
Independence
(b) Describe tasks performed by the Database
Administrator. 04
(c) Differentiate strong entity set and weak entity set. Demonstrate the
concept of both using real-time example using E-R diagram. 07
Q.2 (a) Consider the relation scheme R = {E, F, G, H, I, J, K, L, M, M} and the set of
functional dependencies
{{E, F} -> {G}, {F} -> {I, J}, {E, H} -> {K, L}, K -> {M}, L -> {N} on R.
03
What is the key for R?
(b) Consider a relation scheme R = (A, B, C, D, E, H) on which the following
functional dependencies hold: {A–>B, BC–> D, E–>C, D–>A}. What are the 04
candidate keys of R?( Any 1 in case of more than one candidate key
(c) Draw an E-R diagram of following scenario. Make necessary
assumptions and clearly note down the same.
07
We would like to make our College’s manually operated Library to fully
computerized .
1
Q.5 (a) List and explain ACID properties with respect to Database transaction. 03
(b) Explain RAID Levels with respect to Data Storage. 04
(c) Explain the concept of Conflict Serializable with suitable schedules. 07
Q.8 (a) Explain following SQL commands with syntax and significance.
03
Commit & Rollback
(b) TABLE Worker(WORKER_ID INT NOT NULL PRIMARY
KEY,FIRST_NAME CHAR(25), LAST_NAME CHAR(25),SALARY
INT(15),JOINING_DATE DATETIME,DEPARTMENT CHAR(25));
(c) List the techniques to obtain the query cost. Explain any one. 07
***********************
2
Seat No.: ________ Enrolment No.___________
Marks
Q.5 (a) What is trigger? Explain its type with their syntax. 03
(b) Write a PL/SQL block to print the given number is 04
odd or even.
(c) Consider the following relational schemas: 07
EMPLOYEE (EMPLOYEE_NAME, STREET,
CITY)
WORKS (EMPLOYEE_NAME,
COMPANYNAME, SALARY)
COMPANY (COMPANY_NAME, CITY)
3
Seat No.: ________ Enrolment No.___________
1
(c) A college maintains details of its lecturers' subject area skills. These 07
details comprise:
Lecturer Number, Lecturer Name, Lecturer Grade, Department
Code, Department Name, Subject Code, Subject Name, Subject
Level
Assume that each lecturer may teach many subjects but may not
belong to more than one department. Subject Code, Subject Name
and Subject Level are repeating fields.
Normalize this data to Third Normal Form.
OR
Q.3 (a) Explain various Normal forms up to 3NF. 03
(b) Explain Armstrong’s Axioms in detail. 04
(c) A software contract and consultancy firm maintain details of all 07
the various projects in which its employees are currently involved.
These details comprise: Employee Number, Employee Name,
Date of Birth, Department Code, Department Name, Project Code,
Project Description, Project Supervisor
Q.5 (a) What is PL/SQL. Explain the difference between SQL and 03
PL/SQL.
(b) Write a note on two phase locking protocol. 04
(c) Consider following schema and write SQL for given 07
statements.
*************
3
Seat No.: ________ Enrolment No.___________
Q.2 (a) What is the difference between data security and data integrity? 03
(b) What is transaction? List and explain ACID property of transaction. 04
(c) Design a database for an airline. The database must keep track of 07
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.
OR
(c) Design a database for a hospital with a set of patients and a set of medical 07
doctors. Associate with each patient a log of the various tests and
examinations conducted 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.
Q.3 (a) What is constraint? Explain types of constraints. 03
(b) Consider following set F of functional dependencies on schema R(A,B,C) 04
and compute canonical cover for F.
A→ BC
1
B→ C
A→B
AB → C
(c) Why should normalization be performed on a table and what are its 07
benefits. Explain 3NF and BCNF
OR
Q.3 (a) Describe the following SQL functions: (i) Add_months(x,y) (ii) Rtrim() 03
(iii) To_date
(b) Normalize the following schema, with given constraints, to 4NF. 04
books(accessionno, isbn, title, author, publisher)
users(userid, name, deptid, deptname)
List of constraints:
accessionno → isbn
isbn → title
isbn → publisher
isbn →→ author
userid → name
userid → deptid
deptid → deptname
(c) What is redundant functional dependency? Explain trivial and non trivial 07
functional dependency with example.
Q.4 (a) Explain on delete cascade with example. 03
(b) Explain system recovery procedure with Checkpoint record concept. 04
(c) Explain following relational algebraic operation (i) Division (ii) inner join 07
(iii) intersection
OR
Q.4 (a) Explain commit, rollback and savepoint command. 03
(b) Explain Log based recovery method. 04
(c) Explain following relation algebra operations: (i) full outer join (ii) 07
projection (iii) Cartesian product.
Q.5 (a) Write a PL/SQL block to print the sum of Numbers from 1 to 100. 03
(b) Explain the purpose of sorting with example with reference to query 04
optimization.
(c) Explain conflict serializability and view serializability with example. 07
OR
Q.5 (a) Write a PL/SQL block to print the given number is prime or not. 03
(b) Explain the measures of finding out the cost of a query in query 04
processing.
(c) What is a recoverable schedule? Why is recoverability of schedules 07
desirable? Are there any circumstances under which it would be desirable
to allow non-recoverable schedules? Explain your answer
*************
2
Seat No.: ________ Enrolment No.___________
Q.5 (a) What is log based recovery? Explain Immediate database modification technique 03
for database recovery.
(b) List and discuss ACID properties of transaction. 04
(c) Write a note on conflict serializability. 07
OR
Q.5 (a) What is deadlock of transaction? Explain wound wait technique for prevention of 03
deadlock.
(b) What is meant by normalization? Write its need. List and discuss database anomaly 04
during database design.
1
(c) Consider following schema and write SQL for given statements. 07
employee (employee-name, street, city)
works (employee-name, company-name, salary)
company (company-name, city)
manages (employee-name, manager_name)
1. Find the names of all employees who work for First Bank Corporation.
2. Give all employees of First Bank Corporation a 10-percent raise.
3. Find the names and cities of residence of all employees who work for First Bank
Corporation.
4. Find the names, street addresses, and cities of residence of all employees who
work for First Bank Corporation and earn more than $10,000.
5. Find all employees in the database who live in the same cities as the companies for
which they work.
6. Find all employees in the database who do not work for First Bank Corporation.
*************
2
Seat No.: ________ Enrolment No.___________
GUJARAT TECHNOLOGICAL UNIVERSITY
BE - SEMESTER–III (NEW) - EXAMINATION – SUMMER 2018
Subject Code:2130703 Date:23/05/2018
Subject Name:Database Management Systems
Time:10:30 AM to 01:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
MARKS
Q.1 (a) Define view. Write syntax to create view .Give an example of view. 03
(b) Explain tasks of DBA. 04
(c) Explain disadvantages of conventional file-based system compared to Database 07
management system.
Q.2 (a) List and explain DML statements with suitable example. 03
(b) Define: Primary key, Foreign Key and NOT NULL constraint 04
(c) Explain three level architecture of DBMS. 07
OR
(c) Explain different types of outer join with example. 07
Q.3 (a) Write a note on two phase commit protocol. 03
(b) List and explain aggregation functions with suitable example. 04
(c) Explain specialization and generalization concepts in ER diagram with suitable 07
example.
OR
Q.3 (a) Write a note on trigger. 03
(b) Compare rollback with commit SQL commands. 04
(c) Draw E-R diagram for bank management system. 07
Q.4 (a) Write differences between shared lock and exclusive lock. 03
(b) Define transaction. Explain various states of transaction with suitable diagram. 04
(c) Explain steps of query processing with the help of neat diagram. 07
OR
Q.4 (a) Describe GRANT and REVOKE commands. 03
(b) Write a note on two phase locking protocol. 04
(c) Explain stored procedure with proper example. 07
Q.5 (a) What is log based recovery? Explain Immediate database modification technique 03
for database recovery.
(b) List and discuss ACID properties of transaction. 04
(c) Write a note on conflict serializability. 07
OR
Q.5 (a) What is deadlock of transaction? Explain wound wait technique for prevention of 03
deadlock.
(b) Elaborate Normalization. Explain any two normal forms with suitable 04
example(s).
(c) Consider following schema and write SQL for given statements. 07
Client_master(clientno, name, address, city, pincode, state, baldue)
Salesman_master(Salesmanno,name,address,city,pincode,state,salary,tgtotget,
remarks)
1) Find out the names of all clients.
2) List all the clients who are located in Mumbai.
3) Delete all salesmen from salesman_master whose salaries are equal to
Rs.3500.
4) Destroy the table client_master along with data.
5) List the name of all clients having ‘a’ as the second letter in their names.
6) Count the number of products having cost price is less than or equal to
500.
7) Calculate the average, minimum and maximum sell price of product.
*************
Seat No.: ________ Enrolment No.___________
MARKS
Q.1 (a) Define Primary key, Candidate key and Super key. 03
(b) Define DBMS. Describe significant differences between a file-processing system and a 04
DBMS.
(c) Explain the ACID properties using suitable example. 07
Q.2 (a) Explain the difference between a weak and a strong entity set. 03
(b) What are main functions of a Database Administrator? 04
(c) Design a generalization–specialization hierarchy for a motor-vehicle sales company. The 07
company sells motorcycles, passenger cars, vans, and buses. Justify your placement of
attributes at each level of the hierarchy. Explain why they should not be placed at a
higher or lower level.
OR
(c) Construct an E-R diagram for a car-insurance company whose customers own one or 07
more cars each. Each car has associated with it zero to any number of recorded accidents.
Q.3 (a) What is Relational Algebra? Define Relational Algebra Operation Cross product with 03
example.
(b) Describe GRANT and REVOKE commands with suitable example. 04
(c) Explain Two phase locking protocol. 07
OR
Q.3 (a) List reasons why null values might be introduced into the database. 03
(b) Consider the relational database given below. Give an expression in the relational algebra 04
to express each of the following queries:
Employee (person-name, street, city) , Works (person-name, company-name, salary)
Company (company-name, city) , Manages (person-name, manager-name)
1) Find the names of all employees in this database who live in the same city as the
company for which they work.
2) Find the names, street address, and cities of residence of all employees who work
for HCL and earn more than $10,000 per annum.
(c) Discuss various steps of query processing with proper diagram. 07
Q.4 (a) Consider schema R = (A, B, C, G, H, I) and the set F of functional dependencies 03
{A → B, A → C, CG → H, CG → I, B → H}.( Use F+ )
Q.5 (a) Explain various types of LOCKs used in Lock base protocol for concurrency control. 03
(b) What are triggers? Explain the advantages and the needs of triggers. 04
(c)Write a PL/SQL program for inserting even numbers in EVEN table and odd number in 07
ODD table from number 1 to 50.
OR
Q.5 (a) Explain Cursor in PL/SQL 03
(b) Explain deadlock with suitable example. 04
(c) What is Normalization? Normalize below given relation up to 3NF. 07
STUDENT:
Stu Stu City Pin Project Project Course Content
ID Name code ID Name
S101 Ajay Surat 326201 P101 health programming C++, Java,C
S102 Vijay Pune 325456 P102 social WEB HTML,PHP,ASP
*************