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

COMPUTER ENGINEERING DEPARTMENT

C.K.PITHAWALA COLLEGE OF ENGINEERING & TECHNOLOGY, SURAT


GUJARAT TECHNOLOGICAL UNIVERSITY

DataBase Management Systems(3130703)


Question Bank, 202-23
Course CO Statements
Outcomes

CO1 Recognize the various elements of Database Management Systems.

CO2 Given a problem statement, identify the entities and their relations and draw
an E-R diagram and design database applying normalization.

CO3 Solve the given problem using Relational Algebra, Relational Calculus, SQL
and PL/SQL

CO4 Apply and relate the concepts of transaction, concurrency control, recovery
and security in database

CO5 Recognize the purpose of query processing, optimization and demonstrate


the SQL query evaluation

CO1 Questions

1. What are the main functions of a database administrator?


2. Explain Data Abstraction.
3. Explain DDL(Data Definition Language).
4. Define Primary key, Candidate key and Super key.
5. Enlist and explain the advantages of DBMS over traditional file systems.
6. What is a Data Dictionary? Explain DDL, DML & DCL.
7. Explain Schema, Instance, Relation & Tuple.
8. Mention and Explain types of database users.
CO2 Questions

1. Draw an Entity Relation diagram for the Hospital Management System. Consider
the different types of Patients with respect to Disease and In-Patient and
Out-Patient Department in the design. Consider the availability of all well
qualified Doctors. Consider various types of tests and operations to be
conducted. Assume suitable attributes.
2. Explain mapping cardinality.
3. What is Normalization? Normalize the following relation up to 3NF.
STUDENT:

Stu_ID Stu_Name City PinCode Project_ Project Course Content


ID _Name

S101 Ajay Surat 395009 P101 Health Java CoreJava,


EJB

S102 Vijay Pune 325456 P102 Social Web HTML,


PHP, ASP

4. What is Normalization? Explain any two update anomalies with suitable


example(s).
5. Construct an E-R diagram for a car insurance company whose customers own
one or more cars each. Each car has associated with it zero to any number of
recorded accidents. Each insurance policy covers one or more cars, and has one
or more premium payments associated with it. Each payment is for a particular
period of time and has an associated due date and the date when the payment
was received.
6. Explain specialization and generalization concepts in ER diagrams with suitable
examples.
7. Consider schema R = (A, B, C, G, H, I) and the set F of functional dependencies {A
→ B, A → C, CG → H, CG → I, B → H}. Prove that AG →I Holds.
8. A college maintains details of its lecturers' subject area skills. These 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.
9. Draw ER diagram for university database consisting of four entities Student,
Department, Class and Faculty. Students have a unique id, the student can enroll
for multiple classes and has at most one major. Faculty must belong to the
department and faculty can teach multiple classes. Each class is taught by only
faculty. Every student will get a grade for the class he/she has enrolled in.
10. Explain properties of Normalization.
11. Explain Armstrong’s Axioms in detail.
12. Differentiate between strong entity set and weak entity set. Demonstrate the
concept of both using real-time examples using E-R diagrams.

CO3 Questions

1. Explain Any 3 Relational Algebra operations.


2. Define cursor. Briefly describe types of cursor in PL/SQL.
3. Write SQL queries for the following tables:
T1 ( Empno, Ename, Salary, Designation)
T2 (Empno, Deptno)

❖ Display all the details of the employee whose salary is less than 10K.
❖ Display the Deptno in which Employee Seeta is working.
❖ Add a new column Dept name in table T2.
❖ Change the designation of Geeta from ‘Manager’ to ‘Senior Manager’.
❖ Find the total salary of all the employees.
❖ Display Empno, Ename, Deptno and Deptname.
❖ Drop the table T1.

4. The relational database schema is given below.


employee (person-name, street, city)
works (person-name, company-name, salary)
company (company-name, city)
manages (person-name, manager-name)

Write the relational algebra expressions for the given queries.


❖ Find the names of all employees who work for First Bank
❖ Corporation.
❖ Find the names and cities of residence of all employees who work for First
Bank Corporation.
❖ Find the names, street address, and cities of residence of all employees
who work for First Bank Corporation and earn more than $10,000 per
annum.
❖ Find the names of all employees in this database who do not work for
First Bank Corporation.
5. What is PL/SQL? Explain the difference between SQL and PL/SQL.
6. Consider the following schema and write SQL Queries for given statements.

Student (RollNo, Name, DeptCode, City)


Department (DeptCode, DeptName)
Result (RollNo, Semester, SPI)

❖ Display the name of students with RollNo whose name ends with ‘sh’.
❖ Display department wise total students whose total students are greater
than 500.
❖ List out the RollNo, Name along with CPI of Student.
❖ Create a RollNo field as the primary key for the existing Student table.
❖ Display the student name who got the highest SPI in semester 1.
❖ Display the list of students whose DeptCode is 5, 6,7,10.
❖ Create table Student_New from the student table without data.

7. Consider the following relational database schema consisting of the four relation
schemas:
passenger ( pid, pname, pgender, pcity)
agency ( aid, aname, acity)
flight (fid, fdate, time, src, dest)
booking (pid, aid, fid, fdate)

❖ Answer the following questions using relational algebra queries.


❖ Get the details about all flights from Chennai to New Delhi.
❖ Get the complete details of all flights to New Delhi.
❖ Find the passenger names for passengers who have bookings on at least
one flight.
8. What is the trigger? Explain its type with their syntax.
9. 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));
TABLE Bonus(WORKER_REF_ID INT, BONUS_AMOUNT INT(10), BONUS_DATE
DATETIME, FOREIGN KEY (WORKER_REF_ID) REFERENCES
Worker(WORKER_ID));
TABLE Title(WORKER_REF_ID INT, WORKER_TITLE CHAR(25),
AFFECTED_FROM DATETIME, FOREIGN KEY (WORKER_REF_ID) REFERENCES
Worker(WORKER_ID));

Consider above 3 tables, assume appropriate data and solve following SQL
queries:
❖ Find out unique values of DEPARTMENT from the Worker table.
❖ Print details of the Workers whose SALARY lies between 100000 and
500000.
❖ Print details of the Workers who have joined in Feb '2014.
❖ Fetch worker names with salaries >= 50000 and <= 100000.

CO4 Questions

1. Define transaction. Explain various states of transaction with suitable diagrams.


2. What is log based recovery? Explain Immediate database modification technique
for database recovery.
3. Explain Authentication in terms of Database Security.
4. Enlist and explain ACID properties for transactions.
5. Write a note on two phase locking protocol.
6. Write a short note on intrusion detection.
7. Write a short note on SQL injection.
8. Explain B-trees.
9. Explain Authorization and access control in brief.
10. Explain conflict serializability with the help of a suitable example.

CO5 Questions

1. Enlist and explain the basic steps in Query Processing.


2. What is the Query Optimization Process? Explain.
3. Write short on block nested loop join.
4. List the techniques to obtain the query cost. Explain any one.

You might also like