Database
Database
Database
___________
MARKS
Q.1 (a) Explain the different types of database users. 03
(b) What are the responsibilities of a DBA? 04
(c) Explain database system 3 tier architecture with clear diagram in 07
detail.
Q.2 (a) Explain candidate key, primary key and foreign key. 03
(b) Explain Mapping Cardinalities. 04
(c) Explain Entity Relationship model with example. 07
OR
(c) What is join? Explain various type of joins with example. 07
Q.4 (a) Explain log based recovery and mention all its types. 03
(b) Explain Two phase commit protocol? 04
(c) What is a transaction? Explain the ACID properties. 07
OR
Q.4 (a) Write short note on data encryption. 03
(b) Explain deadlock detection. 04
(c) Explain conflict serializability and view serializability. 07
1
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.
OR
Q.5 (a) Explain DDL,DML,DCL with example 03
(b) Discuss aggregate functions with example(s). 04
(c) Explain stored procedures and stored functions. 07
*************
2
Enrolment No./Seat No_______________
Q.1 (a) Define Logical Data Independence and Physical Data Independence. 03
(b) Draw and explain 3 layers of abstraction of DBMS 04
(c) Write relational algebra expression for following 07
(query 1,2 and 3 carry one mark/query 4 & 5 carry two marks)
Employee(eid, ename, salary, deptid)
Department(deptid, dname)
1) List name of all employee
2) List all the departments with id > 5
3) List sum of the salary all employees.
4) Department wise count the number of employees
5) Find the name of employee earning highest salary.
Q.3 (a) Give syntax of command used to add a new column in a table. 03
(b) Define indexing. How will it be useful for searching data? 04
(c) How can we measure cost of Join query? Explain using example. 07
OR
Q.3 (a) Write an SQL command to modify the content of table. 03
(b) Explain sparse indexing with the help of diagram. 04
(c) Draw and explain the query processing steps 07
Q.4 (a) What is relational model? Explain schema diagram using example. 03
(b) Define transaction and its properties? 04
(c) Write a note on view serializability 07
OR
Q.4 (a) With the help of example explain Generalization.. 03
(b) Define various approach used for Log based recovery 04
(c) List and explain various types of Locks used for concurrency control. 07
1
Q.5 (a) How can we print output in PL/SQL block? Give example. 03
(b) Explain cursor and its types. 04
(c) Write SQL queries for the following 07
(query 1,2 and 3 carry one mark/query 4 & 5 carry two marks)
Employee(eid, ename, salary, deptid)
Department(deptid, dname)
1. List name of all employee
2. List all the departments with id > 5
3. List sum of the salary all employees.
4. Department wise count the number of employees
5. Find the name of employee earning highest salary.
OR
Q.5 (a) Define encryption and decryption. 03
(b) List various types of Trigers. 04
(c) What is role? How can we authorize a user using grant and revoke command? Give 07
example.
*************
2
Seat No.: ________ Enrolment No.___________
1
Check out that relation is in 3NF or not? If not decompose it in 3NF.
Q.4 (a) List the type of storages in DBMS. Explain in brief: indexed based 03
accessing.
(b) Explain authorization and authentication with respect to database 04
security.
(c) Which type of queries would be solved by Division operator? Explain 07
with examples.
OR
Q.4 (a) Write short note on : Hashing technique. 03
(b) Explain ACID properties of transaction. 04
(c) With neat diagram steps involved in query processing. 07
Q.5 (a) Explain the concept of deadlock in brief. 03
(b) Explain GRANT and REVOKE commands with suitable example. 04
(c) Write a PL/SQL function which takes 3 integer numbers as a parameters 07
and return an average of same.
OR
Q.5 (a) Differentiate between Conflict and View Serializability with respect to 03
transaction(any three differences) .
(b) Enlist types of joins. Explain each with SQL syntax. 04
(c) TABLE Worker(WORKER_ID INT NOT NULL PRIMARY 07
KEY,FIRST_NAME CHAR(25), LAST_NAME CHAR(25),SALARY
INT(15),JOINING_DATE DATETIME,DEPARTMENT CHAR(25));
*************
2
Seat No.: ________ Enrolment No.___________
MARKS
Q.1 (a) Explain three levels of data abstraction. 03
(b) Describe Data Definition Language and Data Manipulation Language. 04
(c) What is integrity constraint? Explain primary key, reference key and 07
check constraint with SQL syntax.
Q.3 (a) Write Relational Algebra syntax for the following queries. 03
Employee(eno,ename,salary,designation)
Customer(cno,cname,address,city)
1) Find out name of employees who are ‘Manager’.
2) Display name of customers.
3) Retrieve Employee records whose salary is less than 20,000.
(b) Differentiate lossy decomposition and lossless decomposition. 04
(c) What is redundancy? Explain insert, update and delete anomalies in 07
database with example.
OR
Q.3 (a) Write Relational Algebra syntax for the given queries using the 03
following database.
Employee(eno,ename,salary,designation)
Customer(cno,cname,address,city)
1) Find out name of employees who are also customers.
2) Find out name of person who are employees but not customers.
3) Display all names who are either employees or customers.
(b) What is the limitation of index-sequential file? Explain with example 04
how B+ tree overcomes it.
(c) What is the difference between Join and Sub query? Explain any two 07
built-in function for following category. 1) Numeric 2) String 3) Date
Q.4 (a) What is the view? How does it different from the table? 03
(b) Explain below mentioned features of concurrency. 04
1
1) Improved throughput 2) Reduced waiting time
(c) What is index in the database? Explain sparse indices and Dense indices 07
with proper example.
OR
Q.4 (a) Differentiate dynamic hashing and static hashing. 03
(b) What is the atomicity and consistency property of transaction? 04
(c) What is Query processing? Explain why ‘Parsing and translation’ and 07
‘Optimization’ steps are required for query processing.
Q.5 (a) How does ‘partial commit’ state differ from ‘commit’ state of the 03
transaction?
(b) Enlist and explain user authorization to modify the database schema. 04
(c) How does two phase locking protocol differ from timestamp based 07
protocol? Explain timestamp-ordering protocol.
OR
Q.5 (a) Why does the trigger require in database? Write SQL syntax for creating 03
database trigger.
(b) When do we require to use group by clause? How aggregate functions 04
are used with group by clause?
(c) When Join is used in SQL? Explain Left outer, Right outer and Full outer 07
join with SQL syntax.
************
2
Seat No.: ________ Enrolment No.___________
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’.