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

DBMS Question Bank For End SEM Exam

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

DBMS Question Bank for End SEM Exam

1. Drawbacks of file system.


2. Define database system.
3. What are the advantages of database system over file system?
4. Differentiate file system and database system.
5. Applications of DBMS
6. Explain three schema architecture with diagram and example.(internal level, conceptual
level, external level)
7. Explain in detail data independence with diagram and example. (Logical data independence
and physical data independence).
8. Explain DBMS architecture with diagram.
9. What are the different types of database users explain each.
10. What do you mean by two levels and three levels architecture? Explain with diagram.
11. Explain functions/responsibilities of Database administrator.
12. What are the different types of attributes in ER diagram?
13. What are the stored attribute and derived attribute? Explain with example.
14. Define entity type, entity set, weak entity, regular entity, total participation, partial
participation.
15. Define primary key, foreign key, candidate key, super key with example
16. Explain with example specialization and Generalization.
17. Explain overlapping, disjoint.
18. Explain various mapping rules to convert EER into relational schema with example.
19. Draw E-R diagram for Library management system. Students and faculties are members
who borrow and return the books. Books have title, author, publication, price and number
of books.
20. Consider the following set of requirements for a university database:
 The university keeps track of each student's name, roll number, hostel room, phone,
gender, joining year, degree, department, registered subjects and completed
subjects. Roll number should have a unique value for each student.
 Each department is described by a name, department code, office phone and
college. Both name and code have unique value.
 Each subject has a name, description, subject id, credits, level and offering
departments. The value of subject id is unique for each subject.
Draw an ER diagram and Design a relational schema for this application. Note any
unspecified requirements and make appropriate assumptions to make the specifications
complete.

21. Define with example primary key, foreign key, disjoint, overlapping, total participation.
22. Illustrate data independence with example
23. Compare Database System and File system with example.
24. What are the advantages of Database management system over File system?
25. What are the five main functions of a database administrator? Give detail explanation.
26. Construct an E-R diagram and create relational schema for a hospital with a set of patients
and a set of medical doctors. Associated with each patient a log of the various test and
examinations conducted.
27. What are the different types of Cardinality Constraints?
28. Design an ER diagram for keeping track of the exploits of your favorite sports team. You
should store the matches played, the scores in each match, the players in each match, and
individual player statistics for each match. Summary statistics should be modeled as
derived attributes.
29. Explain Aggregation with example.
30. Consider an E-R diagram in which the same entity set appears several times. Why is
allowing this redundancy a bad practice that one should avoid whenever possible?
31. Design a database for a worldwide package delivery company (e.g., DHL or FedEx). The
database must be able to keep track of customers who ship items and customers who
receive items; some customers may do both. Each package must be identifiable and
trackable, so the database must be able to store the location of the package and its history
of locations. Locations include trucks, planes, airports, and warehouses. 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.
Design a generalization–specialization hierarchy for a motor-vehicle sales company. The
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. Construct the relational model for the above problem statement.
32. Design a database for an airline. The database 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
33. Consider a database used to record the marks that students get in different exams of
different course offerings (sections).
a) Construct an ER diagram that models exams an entity, and uses ternary relationship, for
the database.
b) Construct an alternative ER diagram for question (30) that uses only a binary
relationship between student and section. Make sure that only one relationship exists
between a particular student and section pair, yet you can represent the marks that a
student gets in different exams.
34. Draw E-R diagram and create Relational schema. Classroom has no. of benches. Each
bench has its unique no., width, height, length & capacity. It is made up with different
material. Bench must be located in the classrooms. Classroom may or may not have
benches. When the bench placed in the particular CR is recorded.
35. Consider a university database for the scheduling of classrooms for -final exams. This database
could be modelled as the single entity set exam, with attributes course-name, section number,
room-number, and time. Alternatively, one or more additional entity sets could be defined, along
with relationship sets to replace some of the attributes of the exam entity set, as
1. course with attributes name, department, and c-number
2. section with attributes s-number and enrolment, and dependent as a weak entity set on course
3. room with attributes r-number, capacity, and building
Show an ER diagram illustrating the use of all three additional entity sets listed.
Construct the relational model for the above problem statement.
36. Compare a weak and a strong entity set with some examples and diagram.
37. Explain the distinction between disjoint and overlapping constraints.
38. Explain the distinction between total and partial constraints.
39. Illustrate in detail Specialization with Disjoint, overlapping constraints with example.
40. Write syntax and example of following relational algebra operation. i) Outer joins ii)Union
iii) Aggregate functions iv) cartesian product
41. Write syntax and example of following relational algebra operation i) join ii) Division
operation iii)Difference vi) intersection
42. Write syntax and example of following relational algebra operation. i)Select ii)Project
iii)Rename iv) set intersection
43. Write syntax and example of following relational algebra operations. cross join, equi join
and outer join. Identify and write, which join operation is suitable in which situation.
44. Explain aggregate functions with relational algebra notations and example.
45. What do you mean by serial and non-serial schedule?
46. Define Consistency property of Transaction with example.
47. Consider the following relations for database that keeps track of student enrollment in
courses and book issued for each course
a) Student (Ssn,Name,Subject ,Dob)
b) Course (Course_id, Name,Dept)
c) Enroll (Ssn,Course_id,Semester,Grade)
d) Book_issued (Course_id,Semester,ISBN)
e) Text(ISBN,Title,Publisher,Author)
Write following queries in relational Algebra
a) Write a query to select all courses available in institute
b) Find all student details registered for course_id is 10
c) Find various book titles and authors for semester higher than 3
d) Find all students belonging to Computer Department
e) Find all students enrolled for above course_id
48. Consider the following relations given below
Dealer(Dealer_no, Dname,address)
Part(Part_no,Pname,color)
Assigned_to(Dealer_no, Part_no,cost)
Give an expression in relational algebra the following queries
a) Find the name of all dealers who supply „Red‟ Parts.
b) Find the names of the dealers who supply both Yellow and Green parts c) Find
the names of the delears who supply all the parts.
d) List all dealer names
49. Consider the following relations for database that keeps track of student enrollment in courses
and book issued for each course
a) Student (Ssn,Name,Subject ,Dob)
b) Course(Course_id, Name,Dept)
c) Enroll (Ssn,Course_id,Semester,Grade)
d) Book_issued (Course_id,Semester,ISBN)
e) Text(ISBN,Title,Publisher,Author)
Write following SQL queries
a) Write a query to select all courses available in institute
b) Find all student details registered for course_id is 10
c) Find various book titles and authors for semester higher than
3
d) Find all students belonging to Computer Department
e) Find all students enrolled for above course_id
50. Consider the following relations given below
Dealer(Dealer_no, Dname,address) Part(Part_no,Pname,color)
Assigned_to(Dealer_no, Part_no,cost)
Write SQL queries for the following queries
a) Find the name of all dealers who supply „Red‟ Parts.
b) Find the names of the dealers who supply both Yellow and
Green parts
c) Find the names of the dealers who supply all the parts.
d) Find the names of suppliers supplying some red part for cost
less than 100

51. For the following relation schema:


employee(employee-name, street, city)
works(employee-name, company-name, salary)
company(company-name, city) manages(employee-name, manager-
name)
Give an expression in SQL for each of the following queries:
a) Find the names, street address, and cities of residence for all
employees who work for 'First Bank Corporation' and earn more
than $10,000.
b) Find the names of all employees in the database who live in
the same cities as the companies for which they work.
c) Find the names of all employees in the database who live in
the same cities and on the same streets as do their managers.
d) Find the names of all employees in the database who do not
work for 'First Bank Corporation'. Assume that all people work for
exactly one company.
e) Find the names of all employees in the database who earn
more than every employee of 'Small Bank Corporation'. Assume
that all people work for at most one company.
f) Find the name of the company that has the smallest payroll.
g) Find the names of all employees in the database who earn
more than every employee of 'Small Bank Corporation'. Assume
that all people work for at most one company.

52. For the following given database, write SQL queries.


Person(driver_id#, name, address)
Car(license, model, year)
Accident(reportcno, date , location)
Owns(driver_id# , license)
Participated (driver, car, report_num, damg_amt)
i) Find the total no. of people who owned cars that were
involved in accident 2018.
ii) Update the damage amount for car with license number
“Mum2017”in the accident with report number “AR120” to Rs.
6000.
iii) Find the number of accidents in which the cars belonging to
“John Smith” were involved.
iv) Add a new accident to the database; assume any values for
required attributes.
v) Delete the Mazda belonging to “John Smith”.

53. Consider the relational database of Give an expression in


SQL for
employee(employee-name, street, city)
works(employee-name, company-name, salary)
company(company-name, city)
manages(employee-name,manager-name)
a. Modify the database so that Jones now lives in Newtown.
b. Give all employees of First Bank Corporation a 10 percent
raise.
c. Give all managers of First Bank Corporation a 10 percent
raise.
d. Give all managers of First Bank Corporation a 10 percent
raise unless the salary becomes greater than $100,000. In such
cases, give only a 3 percent raise.
e. Delete all tuples in the works relation for employees of Small
Bank Corporation

54. Consider the following schema:


Suppliers(sid: integer, sname: string, address: string)
Parts(pid: integer, pname: string, color: string)
Catalog(sid: integer, pid: integer, cost: real)
The Catalog relation lists the prices charged for parts by Suppliers.
Write the following queries in SQL:
1. Find the pnames of parts for which there is some supplier.
2. Find the snames of suppliers who supply every part.
3. Find the snames of suppliers who supply every red part.
4. Find the pnames of parts supplied by Acme Widget Suppliers
and no one else.
5. Find the sids of suppliers who charge more for some part
than the average cost of that part (averaged over all the suppliers
who supply that part).
6. For each part, find the sname of the supplier who charges the
most for that part.
7. Find the sids of suppliers who supply only red parts.
8. Find the sids of suppliers who supply a red part and a green
part.

55. Consider the following relations given below


Dealer(Dealer_no, Dname, address)
Part(Part_no, Pname, color)
Assigned_to(Dealer_no, Part_no,cost)
Write the following queries in SQL and Give an expression in
relational algebra the following queries.
i. Find the name of all dealers who supply „Red‟ Parts.
ii. Find the names of the dealers who supply both Yellow and
Green parts
iii. Find the names of the delears who supply all the parts.
iv. List all dealer names

56. Write SQL queries


Sailor(sid,sname,rating,age)
Boat(bid,bname,color)
Reserves(sid.bid,date)
i) Find the Sailor(name) with highest rating
ii) Find the average age of Sailor
iii) Find the names of Sailor who have reserved „red‟ boat.
iv) Add the new boat to the database. Assume any values for
required attributes.
v) Find the age of youngest sailor for each rating level
Assume any values for required attributes.

57. For the following given database ,write SQL queries


Employee(eid,ename,street,city)
Works(eid,cid,salary)
Company(cid,cname,city)
Manager(eid,Mname)
i) Find the names ,street, city of all employees who works for
“Infosys” and earn more than Rs.50000
ii)Display the names of employees having “P” as first letter in their
names.
iii)Display the annual salary of all employees.

58. Define Normalization. What is the use of Normal forms?


59. How can you identify the relations is in 1NF or 2NF give suitable examples.
60. Explain different types of Functional dependency.
61. Discuss 1NF and 2NF in detail with example.
62. Discuss 3NF and BCNF in detail with example.
63. How can you identify the relations is in 3NF or BCNF give suitable examples
64. Describe 4NF in detail with example.
65. List different types of integrity constraints, explain each with example.
66. Explain transaction concept. What are the various transaction states?
67. Write trigger syntax and example by considering your own tables.
68. What do you mean by deadlock in transactions?
69. What are DCL and TCL commands? Explain with proper example.
70. Differentiate Lock-based concurrency control and Timestamp-based concurrency
control.
71. Define Deadlock. Explain Deadlock Detection, Prevention and Recovery.
72. Explain 3NF, BCNF and 4NF with suitable examples
73. What is transaction? What are the ACID properties of a transaction?
74. What do you mean by conflicting instructions and non-conflicting instructions?
Explain with proper examples.
75. What is recoverable schedule? Why recoverability of schedule is desirable?
76. Explain conflict serializability with example?
77. Explain view serializability with example?
78. Explain Log-Based recovery.
79. Check whether the given schedule S is conflict serializable and recoverable or not
80. Check whether the given schedule S is conflict serializable or not. If yes, then determine all the
possible serialized schedules-

You might also like