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

DBMS University Questions

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

DBMS QUESTION BANK (UNIVERSITY QUESTIONS)

MODULE I
1. List any three characteristics of database system
2. Draw neat labelled diagram of three schema architecture and briefly describe each level
3. List any three categories of database users, highlighting any one important characteristic of each
category.
4. What are the major difference between structured, unstructured and semi structured data.
5. List any SIX major advantages of using a DBMS
6. What is the concept of a weak entity used in data modelling? Define the terms owner entity type,
Identifying relationship type.
7. Classify the following cases into logical data independence and physical data independence.
(a) Creating an index for a data file
(b) Changing the integrity constraint
(c) Reorganizing the file
8. What is meant by a recursive relationship type? Give an example of recursive relationship type.
9. List out any three salient features of a database systems.
10. When is multi-valued composite attribute used in ER modelling?
11. A company has the following scenario: There are a set of salespersons. Some of them manage
other salespersons. However, a salesperson cannot have more than one manager. A salesperson can
be an agent for many customers. A customer is managed by exactly one salesperson. A customer can
place any number of orders. An order can be placed by exactly one customer. Each order lists one or
more items. An item may be listed in many orders. An item is assembled from different parts and
parts can be common for many items. One or more employees assemble an item from parts. A
supplier can supply different parts in certain quantities. A part may be supplied by different suppliers.
(i) Identify and list entities, suitable attributes, primary keys, and relationshipsto represent the
scenario.
(ii) Draw an ER diagram to model the scenario using min-max notation.
12. Explain three schema architecture with figure
13. Illustrate Database architecture with a neat diagram.
14. Explain the characteristics of Database system
15. Differentiate between two-tier and three-tier client-server database architecture with the help of
neat labelled diagrams.
16. Draw an ER diagram based on the following information,
• Manufacturers have a name, which we may assume is unique, an address, and a phone number
• Products have a model number and a type. Each product is made by one manufacturer, and different
manufacturers may have different products with the same model number. However, you may assume
that no manufacturer would have two products with the same model number
• Customers are identified by their unique social security number. They have email addresses, and
physical addresses. Several customers may live at the same (physical) address, but we assume that no
two customers have the same email address • An order has a unique order number, and a date. An
order is placed by one customer. For each order, there are one or more products ordered, and there is
a quantity for each product on the order.
17. Write briefly about any three types of database end users
18. Interpret the following ER diagram

19. Draw an ER diagram to model the application with the following assumptions. Specify
key attributes of each entity type and (min, max) constraints on each relationship type.
• Each home uniquely defined by home identifier, street address, city, state, a number
of bedrooms and a number of bathrooms and an associated owner.
• Each owner has a Social Security Number, first name, last name, phone, and
profession.
• An owner can spouse one or more homes.
• Agents represent owners in the sale of a home. An agent can list many homes, but only one agent
can list a home.
• An agent has a unique agent number, name, phone number and an associated office.
• When an owner agrees to list a home with an agent, a commission and a selling price are
determined.
• An office has office identifier, phone number, the manager name, address and an optional agent
number.
• Many agents can work at one office.
• A buyer entity type has a Social Security Number, first name, last name, phone,preferences for the
number of bedrooms and bathrooms, and a price range.
• An agent can work with many buyers, but a buyer works with only one agent.
20. What is the difference between logical data independence and physical data independence?
Which one is harder to achieve? Why?
21.

Consider the bank database given above and answer the following questions
i. List the strong (nonweak) entity types in the ER diagram.
ii. Is there a weak entity type? If so, give its name, partial key, and identifying relationship.
iii. What constraints do the partial key and the identifying relationship of the weak entity type specify
in this diagram?
iv. List the names of all relationship types, and specify the (min, max) constraint on each
participation of an entity type in a relationship type.
v. Suppose that every customer must have at least one account but is restricted to at most two loans at
a time, and that a bank branch cannot have more than 1,000 loans. How does this show up on the
(min, max) constraints?
22. Consider the following information about a university database: Professors have a ssn, a name,an
age, a rank, and a research specialty. Projects have a project number, a sponsor name, a starting date,
an ending date, and a budget. Graduate students have ssn, a name, an age, and a degree program
(e.g., M.S. or Ph.D.). Each project is managed by one professor (known as the project’s principal
investigator). Each project is worked on by one or more professors (known as the project’s co-
investigators). Professors can manage and/or work on multiple projects. Each project is worked on by
one or more graduate students (known as the project’s research assistants). When graduate students
work on a project, a professor must supervise their work on the project. Departments have a
department number, a department name, and a location.Departments have a professor (known as the
chairman) who manages the department.Professors work in one or more departments, and for each
department that they work in, a timepercentage is associated with their job. Graduate students have
one major department in which they are working on their degree. Each graduate student has another,
more senior graduate student (known as a student advisor) who advises him or her on what courses to
take. Design and draw an ER diagram that captures the information about the university.
23. Explain the difference between database schema and database state with suitable example.
24. With a neat diagram explain the Three Schema Architecture of a DBMS
25.Design an ER diagram for the following scenario: There is a set of teams, each team has an ID
(unique identifier), name, main stadium, and to which city this team belongs. Each team has many
players, and each player belongs to one team. Each player has a number (unique identifier), name,
DoB, start year, and shirt number that he uses. Teams play matches, in each match there is a host
team and a guest team. The match takes place in the stadium of the host team.For each match we
need to keep track of the following: The date on which the game is played The final result of the
match. The players participated in the match. For each player, how many goals he scored, whether or
not he took yellow card, and whether or not he took red card. During the match, one player may
substitute another player. We want to capture this substitution and the time at which it took place.
Each match has exactly three referees. For each referee we have an ID (unique identifier), name,
DoB, years of experience. One referee is the main referee and the other two are assistant referee.
26. Distinguish between physical data independence and logical data independence with suitable
examples
27. A company has the following scenario: There are a set of salespersons. Some of them manage
other salespersons. However, a salesperson cannot have more than one manager. A salesperson can
be an agent for many customers. A customer is managed by exactly one salesperson. A customer can
place any number of orders. An order can be placed by exactly one customer. Each order lists one or
more items. An item may be listed in many orders. An item is assembled from different parts and
parts can be common for many items. One or more employees assemble an item from parts. A
supplier can supply different parts in certain quantities. A part may be supplied by different suppliers.
(i) Identify and list entities, suitable attributes, primary keys, and relationships to represent the
scenario.
(ii) Draw an ER diagram to model the scenario using min-max notation.
28. Explain three schema architecture with figure
29. Illustrate Database architecture with a neat diagram
30. Explain the characteristics of Database system
31. List out any three salient features of database systems, which distinguish it from a file system.
32. Specify the role of schema in a DBMS.
33. Design an ER diagram for the following scenario:
There is a set of teams, each team has an ID (unique identifier), name, main stadium, and to
which city this team belongs. Each team has many players, and each player belongs to one
team. Each player has a number (unique identifier), name, DoB, start year, and shirt number that he
uses. Teams play matches, in each match there is a host team and a guest team.
34. What facts about the relationships between entities EMPLOYEE and PROJECT are
conveyed by the following ER diagram?
MODULE II
1. Define theta join.
Given the two relations R and S:

2. Define primary key, candidate key and super key.


3. Write briefly about any three relational database integrity constraints.
4. Differentiate between theta join and natural join operations.
5. Consider the relational model constraints: domain constraint, key constraint, entity integrity and
referential integrity. Specify which of these constraints may be violated during the following
modification operations: insert, update and delete.
6. What is meant by complete set of relational algebra? Show how join operation in relational
algebra can be represented using this set.
7. What is entity integrity? Why is it important?
8. Distinguish between Super key, Candidate key, and Primary key using a real convincing example.
9. For the SQL query, SELECT A, B FROM R WHERE B=’apple’ AND C = ‘orange’ on the table
R(A, B, C, D), where A is a key, write any two equivalent relational algebra expressions.
10. Outline the concept of theta-join.
11. Consider the UNIVERSITY database with the following relations:
STUDENT (rollNo, name, degree, year, sex, deptNo, advisor)
DEPARTMENT (deptId, name, hod, phone)
PROFESSOR (empId, name, sex, startYear, deptNo, phone)
COURSE (courseId, cname, credits, deptNo)
ENROLLMENT (rollNo, courseId, sem, year, grade)
TEACHING (empId, courseId, sem, year, classRoom)
PREREQUISITE(preReqCourse, courseID)
Write relational algebra expressions for the following queries:
i. For each department, find its name and the name, sex and phone number of the head of the
department.
ii. Find courses offered by each department.
iii. Find those students who have registered for all courses offered in the department of Computer
Science.
iv. Obtain the department Ids for departments with no lady professor.
v. Obtain the rollNo of girl students who have obtained at least one S grade.
12. What is a foreign key constraint? Why are such constraints important?What is referential
integrity?
13. Convert the following ER diagram into a relational schema

14. Consider the following relation schema with referential integrity constraints:

Write SQL DDL statements for the following:


i. Create table STUDENT, DEPARTMENT, PROFESSOR including primary and foreign key
integrity constraints.
ii. Add an address attribute in the table STUDENT
iii. Write an SQL statement to delete the “CS” department. Given the referential integrity constraints,
explain what happens when this statement is executed.
15. Consider the following schema,
Suppliers (sid , sname, address)
Parts (pid, pname, color)
Catalog (sid, pid, cost)
The primary key fields are underlined.
Write relational algebra expressions for the following queries:
i). Find the name of parts supplied by supplier with sid=105
ii) Find the names of suppliers supplying some green part for less than Rs 1000
iii) Find the IDs of suppliers who supply some red or green part
iv) Find the names of suppliers who supply some red part
16. Differentiate between the following SQL statements

i). DROP and DELETE


ii) ALTER and UPDATE
17. Write SQL DDL statements based on the following database schema (Assume suitable domain
types):
Employee (eid, name, designation, salary, comp_id)
Company (comp_id, cname, address, turnover)
i). Create the above-mentioned tables assuming each company has many employees. Mention the
primary key, foreign key and not null constraints.
ii) Insert values into both the tables. Mention in which order insertions will be carried out.
ii) Modify the table Employee to include a new column “years_of_exp”
iv) Increment the salary of employees whose salary is less than Rs25000 by 5%
18. Illustrate any three ways of using INSERT statement in SQL.
19. Consider the two relations T1 and T2 shown below. Show the results of the following
operations.

i) T1 ⋈T1.Q=T2.BT2
ii) T1 ⟕ T1. P=T2.AT2
iii) T1 U T2
iv) T1 ⋈(T1.P =T2.A AND T1.R = T2.C)T2
20. An Employee relation has attributes: Employee-Id (numeric type), Name (character type),
Salary (numeric type) and Dep-No (numeric type).A Department relation has attributes: Department-
Number (numeric type), Department-Name(character type), Dep-Manager-Id (numeric type).
Employee-Id is the primary key of Employee relation. Department-Number is the primary key of the
Department relation. Dep-No attribute of Employee relation refers to the Department-Number
attribute of Department relation and Dep-Manager-Id attribute of Department relationrefers to the
Employee-Id attribute of Employee relation.
(i) Write create table statements by specifying necessary integrity constraints for creating these two
relations in SQL.
(ii) Write SQL statement to insert the details of an employee John with id 101 with salary 5000 and
working in department number 5.
(iii) Insert the details of a Research Department with Department Number 1 and it has not been
assigned any manager.
(iv) Assume that a department with employees working in it is to be deleted. Specify the two options
to manage this scenario.
21. Convert the ER schema for Bank database given below into a relational schema. Specify all
primary keys and foreign keys.

22. Study the tables given below and write relational algebra expressions for the queries that follow.
STUDENT (ROLLNO, NAME, AGE, GENDER, ADDRESS, ADVISOR)
COURSE (COURSEID, CNAME, CREDITS)
PROFESSOR (PROFID, PNAME, PHONE)
ENROLLMENT (ROLLNO, COURSEID, GRADE)
Primary keys are underlined. ADVISOR is a foreign key referring to PROFESSOR table. ROLLNO
and COURSEID in ENROLLMENT are also foreign keys referring to the primary keys with the
same name.
(i) Names of female students
(ii) Names of male students along with adviser name
(iii) Roll Number and name of students who have not enrolled for any course.
23. Explain the left outer join, right outer join, full outer join operations with Examples.
24. Consider the following relations for a database that keeps track of business trips .of salespersons
in a sales office:
SALESPERSON (Ssn, Name, StartYear, DeptNo)
TRIP(Ssn, FromCity, ToCity, DepartureDate, ReturnDate, TripId)
EXPENSE (TripId, AccountNo, Amount)
i) A trip can be charged to one or more accounts. Specify the foreign keys for this schema, stating
any assumptions you make.
ii) Write relation algebra expression to get the details of salespersons who have travelled between
Mumbai and Delhi and the travel expense is greater that Rs.50000.
iii) Write relation algebra expression to get the details of salesperson who had incurred the greatest
travel expenses among all travels made.
25.List the basic data types available for defining attributes in SQL?
26. EMPLOYEE (ENO, NAME, ADDRESS, DOB, AGE, GENDER, SALARY,DNUM,
SUPERENO)
DEPARTMENT (DNO, DNAME, DLOCATION, DPHONE, MGRENO)
PROJECT (PNO, PNAME, PLOCATION, PCOST, CDNO)
DNUM is a foreign key that identifies the department to which an employee belongs. MGRENO is a
foreign key identifying the employee who manages the department. CDNO is a foreign key
identifying the department that controls the project. SUPERENO is a foreign key identifying the
supervisor of each employee.
Write relational algebra expressions for the following queries:-
(a) Names of female employees whose salary is more than 20000.
(b) Salaries of employee from ‘Accounts’ department
(c) Names of employees along with his/her superviser’s name
(d) For each employee return name of the employee along with his department name and the names
of projects in which he/she works
(e) Names of employees working in all the departments
27. Write SQL DDL statements for the the following (Assume suitable domain types):
i. Create the tables STUDENT(ROLLNO, NAME, CLASS, SEM,
ADVISER), FACULTY(FID, NAME, SALARY, DEPT). Assume that ADVISER is a foreign key
referring FACUTY table.
ii. Delete department with name ‘CS’ and all employees of the department.
iii. Increment salary of every faculty by 10%.
28. Illustrate foreign key constraint with a typical example.
29. For the SQL query, SELECT A, B FROM R WHERE B=’apple’ AND C = ‘orange’ on the
table R(A, B, C, D), where A is a key, write any three equivalent relational algebra expressions.

MODULE III
1. What is the difference between the WHERE and HAVING clause? Illustrate with an example.
2.Explain the difference between Hash indexes and B+-tree indexes.
3. Give any three uses of a trigger
4.A file has r =20000 STUDENT records of fixed length. Each record has the following fields:
NAME (30 bytes), SSN (9 bytes), ADDRESS (40 bytes), PHONE(9 bytes), BIRTHDATE (8 bytes),
GENDER (1 byte), DEPTID (4 bytes), CLASSCODE (4 bytes), and PROGID (3 bytes). An
additional byte is used as a deletion marker. The file is stored on the disk with block size B=512
bytes,
a)Calculate the record size R in bytes.
b)Calculate the blocking factor bfr and the number of file blocks b assuming an unspanned
organization.
C)Calculate the average time it takes to find a record by doing a linear search
5. What is meant by a correlated nested query? Give a suitable example.
6. Explain the advantage of a multilevel index.
7. Illustrate the concept of trigger in SQL with an example
8. Compare DDL and DML with the help of an example
9. How is the purpose of where clause is different from that of having clause?
10. What is the use of a trigger?
11. What is an assertion? How they differ from triggers?
12. Consider the following relation schema and write SQL queries to find:
EMPLOYEE(Fname, Minit, Lname, SSN, Bdate, Address, Sex, Salary SuperSSN, Dno)
DEPARTMENT(Dname, Dnumber, MgrSSN, MgrStartDate)
DEPT_LOCATIONS(Dnumber, Dlocaions)
PROJECT(Pname, Pnumber, Plocation,Dnum)
WORKS_ON(ESSN, Pno,Hours)
i. Retrieve the name and address of all employees who work for the 'Research' department.
ii. For each employee, retrieve the employee's name, and the name of his or her immediate
supervisor.
iii. Retrieve the name of each employee who works on all the projects controlled by department
number 5.
iv. Make a list of all project numbers for projects that involve an employee whose last name is 'Smith'
as a worker or as a manager of the department that controls the project.
v. Retrieve the SSN of all employees who work on project number 1, 2, or 3
13. Consider a disk with block size B =512 bytes. A block pointer is P=6 bytes long and a
record pointer is PR =7 bytes long. A file has r=30,000 EMPLOYEE records of fixed length. Each
record has the following fields: Name (30 bytes),Ssn (9 bytes),Department_code (9 bytes), Address
(40 bytes), Phone (10 bytes), Birth_date (8bytes), Sex (1 byte), Job_code (4 bytes), and Salary (4
bytes, real number). An additionalbyte is used as a deletion marker.
i. Calculate the record size R in bytes.
ii. Suppose that the file is ordered by the key field Ssn and we want to construct a primary index on
Ssn. Calculate The number of first-level index entries and the number of first-level index blocks
iii. Calculate the number of levels needed if we make it into a multilevel index.
14. What is a grid file? What are its advantages and disadvantages?
15. For the relation schema below, give an expression in SQL for each of the queries
that follows:
employee (ID, person_name, street, city)
works (ID, company_name, salary)
company ( company_name, city)
manages (ID, manager_id)
16. Find the employees whose name starts with ‘C’
ii) Find the name of managers of each company
iii) Find the ID, name, and city of residence of employees who works for “First Bank Corporation”
and earns more than Rs50000
iv) Find the name of companies whose employees earn a higher salary, on average, than the average
salary at “First Bank Corporation”
17. Differentiate correlated and non-correlated nested queries with suitable Examples
18. What is multi-level indexing? How does it improve the efficiency of searching an index file?
19. Insert the following keys, in the order given, into a B -tree of order 3:
{10, 50, 20, 5, 22, 25}
20. Consider the following relations:
Employee (Employee-Id, Employee-Name, Salary, Department-No)
Department (Department-No, Department-Name)
Write SQL queries for the following:
(i) Retrieve the employee names and their department names
(ii) Retrieve department names and the average salary given by them
(iii) Retrieve the ids of employees getting salary greater than the average salary of their
department
(iv) For each department that has more than 4 employees, retrieve the department-No and the number
of employees getting salary more than Rs. 50000
21. What is meant by a heap file? Explain how insert, update, delete and search operations can be
performed in a heap file.
22. What are the advantages of Views? Explain two view implementation techniques.
23. Consider a disk with block size 512 bytes. A block pointer is 6 bytes long, and a record pointer
is 7 bytes long. A file has 30,000 EMPLOYEE records of fixed-length. Each record has the following
fields: NAME (30 bytes), SSN (9bytes), DEPARTMENTCODE (9 bytes), ADDRESS (40 bytes),
PHONE (9 bytes),BIRTHDATE (8 bytes), SEX (1 byte), JOBCODE (4 bytes), SALARY (4 bytes,
real number). An additional byte is used as a deletion marker.Assume that file is not ordered by the
key field SSN and we need to create a secondary index on SSN.
(i) Find the number of levels needed, if we make it into a multilevel index.
(ii) Find the number of block accesses needed to retrieve a record from this file if we
use the multilevel index.
24. Illustrate structure of B-Tree and B+ Tree and explain how they are different?
25. What are the different types of single-level ordered indices? Explain.
26. Differentiate between static hashing and dynamic hashing.
27. Write short notes on Nested queries
28For the relation schema below, give an expression in SQL for each of the queries that follows:
employee(employee-name, street, city)
works(employee-name, company-name, salary)
company(company-name, city)
manages(employee-name, manager-name)
a) Find the names, street address, and cities of residence for all employees who work for the
Company ‘RIL Inc.' and earn more than $10,000.
b) Find the names of all employees who live in the same cities as the companies for which they work.
c) Find the names of all employees who do not work for ‘KYS Inc.’. Assume that all people work for
exactly one company.
d) Find the names of all employees who earn more than every employee of ‘SB Corporation'.
Assume that all people work for at most one company.
e) List out number of employees company-wise in the decreasing order of number of employees.
29. Consider an EMPLOYEE file with 10000 records where each record is of size 80 bytes. The file
is sorted on employee number (15 bytes long), which is the primary key. Assuming un-spanned
organization and block size of 512 bytes compute the number of block accesses needed for selecting
records based on employee number if,
i. No index is used
ii. Single level primary index is used
iii. Multi-level primary index is used
Assume a block pointer size of 6 bytes.
30. Illustrate correlated and non-correlated nested queries with real examples.
31. In the following tables foreign keys have the same name as primary keys except DIRECTED-BY,
which refers to the primary key ARTIST-ID. Consider only single-director movies.
MOVIES(MOVIE-ID, MNAME, GENRE, LENGTH, DIRECTED-BY)
ARTIST(ARTIST-ID, ANAME)
ACTING(ARTIST-ID, MOVIE-ID)
Write SQL expressions for the following queries:
(a) Name(s) and director name(s) of movie(s) acted by ‘Jenny’.
(b) Names of actors who have never acted with ‘Rony’
(c) Count of movies genre-wise.
(d) Name(s) of movies with maximum length
32. Consider an EMPLOYEE file with 10000 records where each record is of size 80 bytes.
The file is sorted on employee number (15 bytes long), which is the primary key.Assuming un-
spanned organization, block size of 512 bytes and block pointer size of 5bytes. Compute the number
of block accesses needed for retrieving an employee record based on employee number if (i) No
index is used (ii) Multi-level primary index is used.
MODULE IV
1. Define the term functional dependency. Why are some functional dependencies called
trivial?
2. List Armstrong Axiom rules
3. Define Boyce-Codd normal form. How does it differ from 3NF?
4. Suppose, a relational schema R (P,Q, R, S) and set of functional dependencies F and G are as
follow: F : { P → Q, Q → R, R → S } G : { P → QR, R → S }.
Check the equivalency of functional dependencies F and G.
5. Illustrate different anomalies in designing a database
6. How can we conclude two FDs are equivalent?
7. Why Armstrong’s axioms are said to sound and complete?
8. What is meant by lossless join property?
9. When do you say that a relation is not in 1NF?
10. Given the FDs P→Q, P→R, QR→S, Q→T, QR→U, PR→U, write the sequence of Armstrong’s
Axioms needed to arrive at a. P → T b. PR → S
11. Consider a relation R with five attributes (A,B,C,D,E) . You are given the following
dependencies: A → B, BC → E, and ED → A.
i. List all keys for R.
ii. Is R in 3NF?
iii. Is R in BCNF?
12. Define minimal cover. Let the given set of functional dependencies be: 𝐸: {𝐵 → 𝐴, 𝐷 →𝐴, 𝐴𝐵 →
𝐷} . Find the minimal cover of E
13. Explain with example 2NF, 3NF and BCNF.
14. Explain with example 2NF, 3NF and BCNF. Consider a relation schema R(X Y Z W P ) (above
table R) is decomposed into R1( X Y Z ) and R2( Z W P). Determine whether the above R1 and R2
are Lossless or Lossy?
15. Consider a relation R(A, B, C, D, E) with FDs
AB → C, AC → B, BC → A, D → E.
Determine all the keys of relation R. Also decompose the relation into collections of relations that are
in BCNF.
16. Write briefly on the different types of anomalies in designing a database.
17. Consider a relation schema R (A,B,C,D) with the following functional dependencies A → B, B
→ C, C → D, D → B. Determine whether the decomposition of R into R1 ( A , B ) , R2 ( B , C ) and
R3 ( B , D ) is lossless or lossy. Write the complete steps.
18. What is dependency preservation property for decomposition? Why is it important?
19. i) What are Armstrong’s axioms?
ii) Write an algorithm to compute the attribute closure of a set of attributes (X) under a set of
functional dependencies (F).
iii) Explain three uses of attribute closure algorithm.
20. Explain the difference between BCNF and 3NF with an example
21. Consider the relation R = {A, B, C, D, E, F, G, H} and the set of functional dependencies F =
{A→DE, B→F, AB→C, C→GH, G→H}. What is the key for R? Decompose R into 2NF and then
3NF relations.
22. What is the lossless join property of decomposition? Why is it important?
23. Given relation R(A,B,C,D,E) and functional dependencies F={AB → C, CE → D, A → E}.
Determine whether each functional dependency below is in F+ or not:
i) AB → D
ii) A → C
24. Consider the following relation:
CAR_SALE(Car#, Date_sold, Salesperson#, Commission%, Discount_amt)
Assume that a car may be sold by multiple salespeople, and hence {Car#,Salesperson#} is the
primary key. Additional dependencies are :
Date_sold → Discount_amt and Salesperson# → Commission%
(i) Based on the given primary key and functional dependencies, is this relation in 1NF,
2NF, or 3NF? Why or why not?
(ii) How would you successively normalize it completely?
25. Consider the following decompositions for the relation schema R into R1, R2 and R3.
Determine whether the decomposition has the lossless join property with respect to the given
F.
R={P, Q, R, S, T, U}
R1={P, Q}, R2= {R, S, T}, R3={P,R,U}
F = { P → Q, R → {S, T}, {P,R} → U}
26. Explain insert, update and delete anomalies with suitable examples
27. Illstrate3NF and BCNF with suitable real examples.
28. Given a relation R(A1,A2,A3,A4,A5) with functional dependencies
A1→A2A4 and A4→A5, check if the decomposition R1(A1,A2,A3),R2(A1,A4),R3(A2,A4,A5) is
lossless.
29. Consider the un-normalized relation R(A, B, C, D, E, F, G) with the FDs A→B , AC→G,
AD→EF, EF→G, CDE→AB. Trace the normalization process to reach 3NF relations.
30. Illustrate Lossless Join Decomposition and Dependency Preserving Decomposition with typical
examples.
31. Given the FDs P→Q, P→R, QR→S, Q→T, QR→U, PR→U, write the sequence of Armstrong’s
Axioms needed to arrive at the following FDs: (a) P → T (b) PR → S (c) QR → SU
32. Consider a relation PLAYER (PLAYER-NO, PLAYER-NAME, PLAYER-POSN,TEAM,
TEAM-COLOR, COACH-NO, COACH-NAME, TEAM-CAPTAIN). Assume that PLAYER-NO is
the only key of the relation and that the following dependencies hold:
TEAM→{TEAM-COLOR, COACH-NO, TEAM-CAPTAIN}
COACH-NO→COACH-NAME.
i. Is the relation in 2NF? If not, decompose to 2NF.
ii. Is the relation in 3NF? If not, decompose to 3NF
MODULE 5
1. List the ACID properties of transactions.
2. What is a key-value database? List its major properties.
3. Illustrate two phase locking
4. How conversions of locks are achieved in concurrency control?
5. List and explain the desirable properties of a transaction.
6. Illustrate the states for transaction execution.
7. What is meant by the lost update problem?
8. What is meant by check pointing?
9. Write briefly on log based recovery
10. Explain briefly the characteristics of Column family database.
11. What is a schedule? Define the concepts of recoverable, cascade less and strict schedules, and
compare them in terms of their recoverability.
12. Which of the following schedule is conflict serializable? For each serializable schedule determine
the equivalent serial schedule.
(a) r1 (X); r3 (X); w1(X); r2(X); w3(X)
(b) r1 (X); r3 (X); w3(X); w1(X); r2(X)
(c) r3 (X); r2 (X); w3(X); r1(X); w1(X)
13. What is the two-phase locking (2PL) protocol? How does it guarantee serializability?How strict
2PL differs from basic 2PL?
14. Explain the need for multimodal database.List the important characteristics of ArangoDB.
15. Explain the concepts behind the following: -
i) Log-Based Recovery
ii) Deferred Database Modification.
16. Why recovery is needed in transaction processing?
17. Differentiate serial and concurrent schedules. Elaborate conflict serializability with suitable
example.
18. What are the desirable properties of transactions? Explain
19. Consider the schedule S of three transactions T1,T2 and T3 given below. State whether the
schedule is serializable or not.
S: r3(Y), r3(Z), r1(X),w1(X), w3(Y), w3(Z),r2(Z), r1(Y), w1(Y), r2(Y), w2(Y), r2(X), w2(X)
(Hint: Interpret the notation r3(Y) as the operation read database item Y of transaction T3.)
20. Explain the lost update problem and temporary update problem that occur when concurrent
execution is uncontrolled.
21. Explain conservative and strict two-phase locking techniques. Why strict 2PL is deadlock free?
22. Differentiate among recoverable, cascading rollback and strict schedules with suitable examples.
23. Discuss the four ACID properties and their importance.
24. Determine if the following schedule is conflict serializable. Is the schedule recoverable? Is the
schedule cascade-less? Justify your answers.
r1(X), r2(Z), r1(Z), r3(X), r3(Y ), w1(X), c1, w3(Y), c3, r2(Y), w2(Z),w2(Y), c2
(Note: ri(X)/wi(X) means transaction Ti issues read/write on item X; ci means transaction Ti
commits.)
25. Discuss the main characteristics of Key-value DB and Graph DB.
26.Illustrate two-phase locking with a schedule containing three transactions.Argue that 2PL ensures
serializability. Also argue that 2Pl can lead to deadlock.
27. Explain briefly the ACID properties of a transaction.
28. Check whether the given schedules are conflict serializable or not
i) S1 : R1(X) , R2(X) , R1(Y) , R2(Y) , R3(Y) , W1(X) , W2(Y)
ii) S2 : R1(X) , R2(X) , R2(Y) , W2(Y) , R1(Y) , W1(X)
29. What is two phase locking protocol? How does it guarantee serializability?
30. What are the main characteristics of NOSQL systems in the areas related to data models and
query languages?
31. Determine if the following schedule is recoverable. Is the schedule cascade-less? Justify your
answer. r1(X), r2(Z), r1(Z), r3(X), r3(Y), w1(X), c1, w3(Y), c3, r2(Y), w2(Z), w2(Y),c2.
(Note: ri(X)/wi(X) means transaction Ti issues read/write on item X; ci means transaction Ti
commits.)
32. Two-phase locking protocol ensures serializability. Justify.
33. List out any three salient features of NoSQL databases. Give example of a document in
MongoDB.

You might also like