DATABASE MANAGEMENT SYSTEMS - …atricsetech.weebly.com/uploads/6/5/2/2/6522972/dbms.pdf ·...
Transcript of DATABASE MANAGEMENT SYSTEMS - …atricsetech.weebly.com/uploads/6/5/2/2/6522972/dbms.pdf ·...
DATABASE MANAGEMENT SYSTEMS
COURSE OBJECTIVE
Virtually every area of management uses databases. Marketing professionals to analyze
sales data, human resource managers to evaluate employees, operations manages to track
and improve quality, accountants to integrate data across the enterprise, and financial analysts to analyze a firm‘s performance. Database has evolved from a specialized
computer application to a central component of a modern computing environment. Database
management systems is now an indispensable tool for managing information and a course on the principles and practice of database systems is now an integrated part of the computer
science curriculum.
JNTU SYLLABUS:
UNIT I : Data base System Applications, data base System VS file System – View of Data – Data Abstraction –
Instances and Schemas – data Models – the ER Model – Relational Model – Other Models – Database
Languages – DDL – DML – database Access for applications Programs – data base Users and
Administrator – Transaction Management – data base System Structure – Storage Manager – the Query Processor
UNIT II : History of Data base Systems. Data base design and ER diagrams – Beyond ER Design Entities, Attributes
and Entity sets – Relationships and Relationship sets – Additional features of ER Model – Concept Design
with the ER Model – Conceptual Design for Large enterprises.
UNIT III :
Introduction to the Relational Model – Integrity Constraint Over relations – Enforcing Integrity constraints
– Querying relational data – Logical data base Design – Introduction to Views – Destroying /altering Tables and Views.
Relational Algebra – Selection and projection set operations – renaming – Joins – Division – Examples of
Algebra overviews – Relational calculus – Tuple relational Calculus – Domain relational calculus – Expressive Power of Algebra and calculus.
UNIT IV :
Form of Basic SQL Query – Examples of Basic SQL Queries – Introduction to Nested Queries – Correlated Nested Queries Set – Comparison Operators – Aggregative Operators – NULL values – Comparison using
Null values – Logical connectivity‘s – AND, OR and NOT – Impact on SQL Constructs – Outer Joins –
Disallowing NULL values – Complex Integrity Constraints in SQL Triggers and Active Data bases.
UNIT V :
Schema refinement – Problems Caused by redundancy – Decompositions – Problem related to decomposition – reasoning about FDS – FIRST, SECOND, THIRD Normal forms – BCNF – Lossless join
Decomposition – Dependency preserving Decomposition – Schema refinement in Data base Design – Multi
valued Dependencies – FORTH Normal Form.
UNIT VI :
Transaction Concept- Transaction State- Implementation of Atomicity and Durability – Concurrent – Executions – Serializability- Recoverability – Implementation of Isolation – Testing for serializability-
Lock –Based Protocols – Timestamp Based Protocols- Validation- Based Protocols – Multiple Granularity.
UNIT VII : Recovery and Atomicity – Log – Based Recovery – Recovery with Concurrent Transactions – Buffer
Management – Failure with loss of nonvolatile storage-Advance Recovery systems- Remote Backup
systems.
UNIT VIII :
Data on External Storage – File Organization and Indexing – Cluster Indexes, Primary and Secondary Indexes – Index data Structures – Hash Based Indexing – Tree base Indexing – Comparison of File
Organizations – Indexes and Performance Tuning- Intuitions for tree Indexes – Indexed Sequential Access
Methods (ISAM) – B+ Trees: A Dynamic Index Structure.
TEXT BOOKS :
1. Raghurama Krishnan, Johannes Gehrke, ―Data base Management Systems”, TATA
McGrawHill 3rd Edition 2. Silberschatz, Korth, “Data base System Concepts”, McGraw hill, 5
TH edition.
REFERENCE BOOKS : 1. Peter Rob & Carlos Coronel , “Data base Systems design, Implementation, and Management”,
7th Edition.
2. Elmasri Navrate, “Fundamentals of Database Systems”, Pearson Education
3. C.J.Date, “Introduction to Database Systems”, Pearson Education
SESSION PLAN:
Topics in each unit as
per JNTU
Lecture
No.
Module/Sub Module for each Topic
Text
Books/Ref
erence
Books
UNIT I
1
Course Overview,
Objective of DBMS,data,database,dbms
T1: 1.1
DBMS Applications
DBMS vs File systems
Introduction
2 Introduction to DBMS
DBMS vs file systems
T1-1.3,
T2-1.1
R1-1.1
View of data
3 Data abstraction
Instances and schemas
T1-1.5,
T2-1.3
R2-1.3.2
Data Models
4 ER model
Relational model
Object–relationship model
Object –based data model
T1-2.1,
T2-1.4
R1-1.5
R2-3.1
DB Languages 5
DDL – constraints
DML commands
insert delete and update
T2-1.5
R2-2.3.1
DB Users and
Administrators
6 End users
Application programmers
Database administrator
T2-1.6
R3-2.7
Transaction Mgmt
7
Transaction, Atomicity, Consistency,
Durability
Storage manager, Query Processor
T1-1.7-1.8,
T2-1.7,1.8
T2-1.8
R3-2.8
DB system Structure
8
Structure of DBMS
9 Tutorial
10 Revision: Unit 1
UNIT II
History of DB systems
11 History of database systems
Overview of database design
T2-1.10
DB design & E-R
diagrams
12
Entities, Attributes,
Entity sets, Beyond ER design Entities,
Relationships and relationship sets
T1-2.2, T2-
2.1 R1-
3.3.1-3.3.3
T1-2.1-2.3
Additional features of ER
Model
13
Key Constrints, Weak Entities, class
Hierarchies, Aggregation
T1-2.4.1-
2.4.5 Concept Design with the
ER Model
14 Entity vs Attribute, Entity vs
Relationship, Binary vs Ternary
relations, Aggregation vs Ternary
relationships
Conceptual design for large enterprises
15 DBMS design for large enterprises T1-2.5-2.6
16 Tutorial
17 Revision : Unit II
Unit III Introduction to the Relational Model
18 Creating & Modifying Relations using
SQL T1-3.1 R2-
5.1-5.3
R3-4.1 Integrity Constraint Over
relations
19
Key constraints, foreign key Constraints,
General constraints T1-3.2
Enforcing Integrity
constraints
Querying relational data
20
Transactions and Constraints
Querying the statements T1-3.3-
3.5.2
R3-8.1-
8.5
Logical data base Design
21
Entity sets to tables
Relationship sets to tables
Translating Relationship sets to key
constraints and participation constraints
T1-3.3-
3.5.2
R3-8.1-
8.5
22
Translating weak entity sets, class
hierarchies and ER diagrams with
Aggregation,
Introduction to Views
Destroying /altering Tables and Views.
23
Views, Data Independence, Security,
Updates on views T1-3.6 T2-
3.5
R3-9.1-9.4
Relational Algebra
24
Selection and projection,
Set operations, renaming,
T1-4.2
R2-6.1.1 -
25 Joins,
Division
Examples of Algebra, overviews
6.1.3
T2-3.2
26 Tuple relational Calculus
Domain relational calculus
T1 -4.3 T2-
3.6-3.7 Relational calculus
27
Expressive Power of Algebra and calculus
28 Tutorial
29 Revision: Unit III
Unit IV Form of Basic SQL
Query 30 Examples of Basic SQL Queries T1-5.2-5.3
Nested Queries
31 Introduction to Nested Queries
T1-5.4-5.5
32 Correlated Nested Queries
Set – Comparison Operators Aggregative Operators 33 GROUP BY & HAVING Clauses,
Examples
T1: 5.5
NULL values
34 Comparison using Null values, Logical
connectives AND, OR and NOT
T1-5.6.1-
5.6.2
35
Impact on SQL Constructs, Outer Joins,
Disallowing NULL values
Complex Integrity
Constraints in SQL
36 Constraints over a single table, Domain
constraints and distinct types
T1-5.7
37
Assertions Triggers and Active Data bases
38 Examples of triggers in Sql
T1-5.8
39 Tutorial
40 Revision: Unit IV
Unit-V Schema refinement –
Problems Caused by
redundancy Schema
refinement in Data base Design
41 Introduction to schema refinement
Problems caused by redundancy.
T1-19.1.1
reasoning about FDS Decompositions –
Problem related to
decomposition –
42 Use of decomposition
Problems related to decomposition.
T1-19.1.2-
19.1.3
FIRST, SECOND,
THIRD Normal forms – BCNF
43 First Second and Third Normal forms
T1-19.4
Lossless join
Decomposition.
Dependency preserving Decomposition.
44
Lossless join decomposition
Dependency preserving decomposition
T1-19.5
Multi valued
Dependencies – FORTH
Normal Form.
45
Multi valued dependencies
Fourth normal form
Join dependencies
T1-19.8
46 Fifth normal form
47 Tutorial
48 Revision: Unit V
Unit VI
Transaction Concept- Transaction State
Implementation of
Atomicity and Durability
49 ACID properties, transactions and
schedules
T1-16.1-
16.2
Concurrent Executions,
Serializability.
50 Two phase locking performance locking
T1-16.4-
16.5
Recoverability
Implementation of Isolation. Testing for
serializability
51 Transaction characteristics and
constraints
T1-16.6
Lock –Based Protocols,
Timestamp Based Protocols, Validation-
Based Protocols .
Multiple Granularity
52 Introduction to crash recovery
T1-16.7
53 Tutorial
54 Revision: Unit VI
Unit-VII
Recovery and Atomicity.
55 Lock-based 2PL Serializability and
Recoverability
T1-17.1
Recovery with
Concurrent Transactions.
56 Lock conversions
Lock and unlock requests.
T1-17.2-
17.3
57
Dead lock handling
T1-17.4
Buffer Management .
58 Dynamic database Phantom problem
T1-17.5.1
Failure with loss of
nonvolatile storage 59 Concurrency control in trees
Multiple granularity locks
T1-17.5.2-
17.5.3
Log Based Recovery. 60
Introduction to ARIES
The log ,
T1-18.1-
18.5
61
other recovery related structures
Write – read log protocols check
pointing Advance Recovery
systems. Remote Backup
systems.
62 Analysis phase
Redo phase Undo phase
T1-18.6
63 Tutorial
64 Revision: Unit VII
UNIT-VIII
Data on External Storage–
65 Secondary devices Magnetic devices
CD-R and CD-RW
T1-8.1
File Organization and
Indexing
66 Sequential Direct file processing
T1-
Cluster Indexes, Primary
and Secondary Indexes.
67 Primary and secondary indexes.
T1-8.2.2
Index data Structures.
Hash Based Indexing ,
Tree base Indexing
68 Index data structure Hash based
indexing tree based indexing
T1-8.3
Comparison of File
Organizations .
.
69 Comparison of file Organization indexes
and performance tuning
T1-8.4-8.5
70 Memory hierarchy Magnetic disks
T1-9.1.1
71
Data striping ,redundancy ,levels of
redundancy ,Choice of raid levels,
keeping tracking of free blocks
T1-9.2.1-
9.3.1
Indexes and
Performance Tuning.
72
Buffer replacement policies
Management in DBMS vs. OS files of
records Page – formats record formats.
T1-9.4.1-9.5
Intuitions for tree Indexes. Indexed
Sequential Access
Methods (ISAM) B+ Trees:
73 Intuitions for tree Indexes
ISAM B+ Trees
Dynamic index structure
T1-10.1-
10.3.1
A Dynamic Index
Structure.
74 Static hashing extendable hashing linear
hashed Extendable vs. Linear hashing
T1-11.1-
11.4
75 Tutorial
76 Revision: Unit VIII
TEXT BOOKS (Referred to by faculty)
1) Raghurama Krishnan, Johannes Gehrke, ―Data base Management Systems”, TATA
McGrawHill 3rd Edition. 2) Silberschatz, Korth, “Data base System Concepts”, McGraw hill, 4
H edition.
WEBSITES
Web sites for dbms lecture notes
1)http://pages.cs.wisc.edu/~dbbook/openAccess/thirdEdition/slides/slides3ed.html
2)http://academic.udayton.edu/SaverioPerugini/courses/cps430/lecture_notes/index.html
3.www.db-book.com
JOURNALS
1. IEEE Transactions on knowledge and Data Engineering.
2. The international Journal on Very Large Databases.
3. Distributed and Parallel Databases · An International Journal
STUDENT SEMINAR TOPICS:
1. Data abstraction and hierarchy-ACM JOURNAL
2. Measuring the Quality of Entity Relationship Diagrams –springer
3. Integrating AI and DBMS through stream processing-IEEE
4. SQL query optimization: reordering for a general class of queries-ACM
5. A DBMS prototype to support extended NF2 relations: an integrated view on flat tables and
hierarchies--ACM
6. A DBMS prototype to support extended NF2 relations: an integrated view on flat tables and
hierarchies--ACM
7. Concurrency Control methods—ACM
8. Indexing structure for moving object databases based on R-tree - The Journal of China
Universities of Posts and Telecommunications
ASSIGNMENT QUESTIONS:
UNIT-I
1. List seven programming languages that are procedural and two that are non procedural.
Which group is easier to learn and use? Explain your answer.
2.. List six major steps that you would take in setting up a database for a particular enterprise.
3. What are the main benefits of using a DBMS to manage data in applications involving
extensive data access?
4. List four significant differences between a file-processing system and a DBMS.
5. Identify the main components in a DBMS and briefly explain what they do.
6. What is logical data independence and why is it important?
7. Explain the difference between logical and physical data independence.
8. What is schema and explain the difference between external, internal and conceptual schemas?
9. What is a data model? What is the relational data model? What is data independence and how
does a DBMS support it?
10. What are locks in a DBMS, and why are they used? What is write-ahead logging, and why is it
used? What is check pointing and why is it used?
11. Explain the advantages using a query language instead of custom programs to process data.
12. Explain about the DDL, DML commands?
13. Explain the different roles of databases administrators, application programmers and end users
of a database. Who needs to know the most about database systems?
14. What are five main functions of a database administrator?
15. What is a transaction? What guarantees does a DBMS offer with respect to transactions?
UNIT-II
1. Draw the architecture of DBMS.
2. Name the main steps in database design. What is the goal of each step? In which step is the ER
model mainly used?
3. Define these terms: Entity, Entity set, Attribute and key.
4. Define these terms: relationship, relationship set and descriptive attributes.
5. What is UML? How does database design fit into the overall design of a data-intensive software
system? How is UML related to ER diagrams?
6. Explain following terms briefly: attribute, domain, entity, relationship, entity set, relationship
set, one-to-many relationship, many-to-many relationship, participation constraint, overlap
constraint, covering constraint, weak entity set, aggregation and role indicator.
7. Explain the distinctions among the terms primary key, candidate key and super key.
8. Construct and ER 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.
9. Construct ER diagram for a hospital with a set of patients and a set of medical doctors.
Associate with each patient a log of the various tests and examinations conducted.
10. A university registar‘s office maintains data about the following entities:
(a) courses, including number, title, credits, syllabus and prerequisites;
(b) course offerings, including course number, year, semester, section number, instructors,
timings and classroom;
(c) students, including student-id, name and program;
(d) instructors, including identification number, name, department and title.
Further the enrollment of students in courses and grades awarded to students in each course
they are enrolled for must be appropriately modeled.
Construct an ER diagram for the registar‘s office. Document all assumptions that you make
about the mapping constraints.
11. Consider a database used to record the marks that students get in different exams of different
course offering.
(a) Construct and ER diagram that models exams as entities and uses a ternary relationship for
the above database.
(b) Construct an alternative ER diagram that uses only a binary relationship between students
and course offerings. Make sure that only one relationship exists between a particular student
and course offering pair, yet you can represent the marks that a student gets in different exams
of a course offering.
12. Design an ER diagram for keeping track of the exploits of your favourite 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.
13. Explain the difference between a weak and a strong entity set.
14. Consider a university database for the scheduling of classrooms for final exams. This database
could be modeled 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
Course with attributes name, department and c-number.
Section with attributes s-number and enrollment and dependent as a weak entity set on
course.
Room with attributes r-number, capacity and building.
(a) Show an ER diagram illustrating the use of all three additional entity sets listed.
(b) Explain what application characteristics would influence a decision to include or not to
include each of the additional entity sets.
15. A weak entity set can always be made into a strong entity set by adding to its attributes the
primary key attributes of its identifying entity set. Outline what sort of redundancy will result if
we do so.
UNIT-III
1. What is a relation? Differentiate between a relation schema and a relation instance. Define the
terms arity and degree of a relation. What are domain constraints?
2. What SQL construct enables the definition of a relation? What constructs allow modification of
relation instances?
3. What is the input to a relational query? What is the result of evaluating a query?
4. What are integrity constraints? Define the terms primary key constant and foreign key
constraint. How are these constraints expressed in SQL? What other kinds of constraints can we
express in SQL?
5. What does the DBMS do when constraints are violated? What is referential integrity? What
options does SQL give application programmers for dealing with violations of referential
integrity?
6. When are integrity constraints enforced by a DBMS? How can an application programmer
control the time that constraint violations are checked during transaction execution?
7. What is the difference between a candidate key and the primary key for a given relation? What
is a super key?
8. What is a foreign key constraint? Why are such constraints important? What is referential
integrity?
9. What is a relation database query?
10. Define the following terms: relation schema, relational database schema, domain, relation
instance, relation cardinality and relation degree.
11. What are the SQL constructs to modify the structure of tables and destroy tables and views?
Discuss what happens when we destroy a view.
12. what is view?
13. Describe the set operations of relational algebra, including union (۷), intersection (۷), set-
difference (-), and cross product (X). For each, what can you say about the cardinality of their
input and output tables?
14. Explain how the remaining operator is used. Is it required? That is, if this operator is not
allowed, is there any query that can no longer be expressed in algebra?
15. What is the difference between tuple relational calculus and domain relational calculus?
16. What is an unsafe calculus query? Why is it important to avoid such queries?
UNIT-IV
1. What are the parts of a basic SQL query?
2. What are range variables in SQL?
3. What are nested queries? What is correlation in nested queries? How would you use the
operators IN, EXISTS, UNIQUE, ANY and ALL in writing nested queries? Why are they
useful?
4. What aggregate operators does SQL support?
5. What is grouping and discuss the interaction of the HAVING and WHERE clauses?
6. What are null values? Are they supported in the relational model? Can primary key fields of a
table contain null values?
7. What types of SQL constraints can be specified using the query language?
8. What is a trigger, and what are its three parts? What are the differences between row-level and
statement-level triggers?
9. Why can triggers be hard to understand? Explain the differences between triggers and integrity
constraints. What are triggers used for?
10. 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)
Find the catalog relation lists the prices charged for parts by suppliers. Write the following
queries in SQL:
(a) Find the pnames of parts for which there is some supplier.
(b) Find the snames of suppliers who supply every part.
(c) Find the snames of suppliers who supply every red part.
(d) Find the sids of suppliers who supply only red part.
(e) Find the sids of suppliers who supply a red parts or a green part.
11. How do we declare variables in Embedded SQL?
12. What properties can cursors have?
13. What is Dynamic SQL and how is it different from Embedded SQL?
14. What is JDBC and what are its advantages?
15. Explain the following terms: Cursor, Embedded SQL, JDBC, SQLJ, stored procedure.
16. Explain the term stored procedure, and give example why stored procedures are useful.
UNIT-V
1. Illustrate redundancy and the problems that it can cause. Give examples of insert, delete, and
update anomalies. Can null values help address these problems? Are they a complete solution?
2. What is a decomposition and how does it address redundancy? What problems may be caused
by the use of decompositions?
3. Define functional dependencies. How are primary keys related to FDs?
4. Define 1NF, 2NF, 3NF and BCNF. What is the motivation for putting a relation in BCNF?
What is the motivation for 3NF?
5. When is the decomposition of a relation schema R into two relation schemas X and Y said to be
a lossless-join decomposition? Why is this property so important? Give necessary and sufficient
condition to test whether a decomposition is lossless-join.
6. When is a decomposition said to be dependency-preserving? Why is this property useful?
7. What is a minimal cover for a set of FDs?
8. Discuss how schema refinement through dependency analysis and normalization can improve
schemas obtained through ER design.
9. Define multivalued dependencies, join dependencies and inclusion dependencies.
10. Why are some functional dependencies called trivial?
11. Give a set of FDs for the relation schema R(A,B,C,D) with primary key AB under which R is
in 1NF but not in 2NF.
12. Let R be decomposed into R1, R2, ……………,Rn. Let F be a set of FDs on R.
(a) Define what is means for F to be preserved in the set of decomposed relations.
(b) Describe a polynomial-time algorithm to test dependency-preservation.
(c) Projecting the FDs stated over a set of attributes X onto a subset of attributes Y requires
that we consider the closure of the FDs. Give an example where considering the closure is
important in testing dependency-preservation, that is, considering just the given FDs gives
incorrect results.
UNIT-VI
1. What are the ACID properties? Define atomicity, consistency, isolation and durability and
illustrate them through examples.
2. Define the terms transaction, schedule, complete schedule and serial schedule.
3. Why does a DBMS interleave concurrent transactions?
4. When do two actions on the same data object conflict?
5. What is a serializable schedule? What is a recoverable schedule? What is a schedule that avoids
cascading aborts? What is a strict schedule?
6. What is locking protocol? Describe the Strict Two-Phase Locking (Strict 2PL) protocol. What
can you say about the schedules allowed by this protocol?
7. What overheads are associated with lock-based concurrency control? Discuss blocking and
aborting overheads specifically and explain which is more important in practice.
8. What is thrashing? What should a DBA do if the system thrashes?
9. How can throughput be increased?
10. What is the phantom problem? What impact does it have on performance?
11. What transaction characteristics can a programmer control in SQL?
12. What functionality does the recovery manager of a DBMS provide? What does the transaction
manager do?
13. How is the log used in transaction rollback and crash recovery?
14. What is a transaction? In what ways is it different from an ordinary program (in a language
such as C)?
15. During its execution, a transaction passes through several states, until it finally commits or
aborts. List all possible sequences of states through which a transaction may pass. Explain why
each state transition may occur.
16. Explain the distinction between the terms serial schedule and serializable schedule.
17. Consider the following two transactions:
T1: read(A);
read(B);
if A = 0 then B: = B+1;
write(B).
T2: read();
read(a);
if B = 0 then A: = A+1;
write(A).
18. Since every conflict-serializable schedule is view serializable why do we emphasize
conflict serializability rather than view serializability?
UNIT-VII
1. When are two schedules conflict equivalent? What is a conflict serializable schedule? What is a
strict schedule?
2. What is a precedence graph or serializability graph? How is it related to conflict serializability?
3. What does the lock manager do? Describe the lock table and transaction table data structures
and their role in lock management.
4. Discuss the relative merits of lock upgrades and lock downgrades.
5. Describe and compare deadlock detection and deadlock prevention schemes. Why are detection
schemes more commonly used?
6. In optimistic concurrency control, no locks are set and transactions read and modify data
objects in a private workspace. How are conflicts between transactions detected and resolved in
this approach?
7. In timestamp-based concurrency control, transactions are assigned a timestamp at startup; how
is it used to ensure serializability? How does the Thomas Write Rule improve concurrency?
8. Explain why timestamp-based concurrency control allows schedules that are not recoverable.
Describe how it can be modified through buffering to disallow such schedules.
9. Describe multiversion concurrency control. What are its benefits and disadvantages in
comparison to locking?
10. What is the difference between a lock and a latch?
11. What are the advantages of the ARIES recovery algorithm?
12. Describe the three steps in crash recovery in ARIES? What is the goal of the Analysis Phase?
The redo phase? The undo phase?
13. What is the LSN of a log record?
14. What are the different types of log records and when are they written?
15. What information is maintained in the transaction table and the dirty page table?
16. What is Write-Ahead Logging? What is forced to disk at the time a transaction commits?
17. What is a fuzzy check point? Why is it useful? What is a master log record?
18. In which direction does the Analysis phase of recovery scan the log? At which point in the log
does it begin and end the scan?
19. Describe what information is gathered in the Analysis phase and how.
20. Explain what happens if there are crashes during the undo phase of recovery. What is the role
of CLRs? What if there are crashes during the Analysis and Redo phases?
UNIT-VIII
1. Where does a DBMS store persistent data? How does it bring data into main memory for
processing? What DBMS component reads and writes data from main memory and whi is the
unit of I/O?
2. What is a file organization? What is an index? What is the relationship between files and
indexes? Can we have several indexes on a single file of records? Can an index itself store data
records?
3. What is the search key for an index? What is a data entry in an index?
4. Explain the term memory hierarchy. What are the differences between primary, secondary and
tertiary storage?
5. Explain what a RAID system is and how it improves performance and reliability.
6. What is the role of the DBMS disk space manager?
7. What is the difference between a frame in a buffer pool, a page in a file and a block on a disk?
8. What is a heap file?
9. What are the main differences between ISAM and B+ tree indexes?
10. Describe the B+ tree insertion algorithm, and explain how it eliminates overflow pages. Under
what conditions can an insert increase the height of the tree?
11. What is key compression, and why is it important?
12. Discuss the use of the hash function.
13. Explain how insert and delete operations are handled in a static hash index.
14. What are collisions?
15. Discuss the relationship between extendible and linear hashing.
QUESTION BANK:
UNIT – I
1. (a) What are the types of languages a database system provides? Explain. (b) What are the five main functions of a Database Administrator? (JNTU Apr/May 2009)
2. (a) Explain the Transaction management in a database. (b) Discuss the Query Processor of Database system structure. (JNTU Apr/May 2009)
3. (a) Why would choose a database system instead of simply storing data in oper- ating system files ? When would it make sense not to use a database system? C)What is logical data independence and why is it important? (JNTU Apr/May 2009)
4. Explain the E-R diagram components and notaions with their extended features. (JNTU
Apr/May 2009)
5. Explain the drawbacks of traditional file processing systems with examples.
(May 08, Nov 06, Sep 06, Apr 05, Nov 02)
6. What is DBMS? Explain the advantages of DBMS. . (May 2008)
7. Why would choose a database system instead of simply storing data in operating system files? When would it make sense not to use a database system?(Nov 06)
8. Explain the three levels of data abstraction (May 08, Feb 07,Sep 06, Apr 05)
9. What is logical data independence and why is it important? (Nov 06)
10. What is a data model? Explain the relational data model. . (May 2008)
11. What is ER model? Explain with examples? (Feb 07, Apr 02)
12. Explain the structure of relational model (Apr 06)
13. What are the types of languages a database system ? (Nov 06)
14. Explain the following commands of SQL (May 06)
i. INSER T ii. UPDATE iii. DELETE iv. SELECT
15. Explain the general syntax of SELECT command. (May 06)
16. Explain the five main functions of a database administrator (Nov 06, Aug 08)
17. Explain the transaction management in a database (Feb 07)
18. Discuss the query processor of database system structure (Feb 07)
19. Describe the overall database system structure with a diagram. (Feb 07, Sep 06)
20. Explain various steps involved in the query processing. (Apr 05) (Dec 02)
Unit II
1. (a) What is a relation? Differentiate between relation schema and relation in- stance. Define the terms unity and degree of relation. What are domain constraints? (b) What SQL construct enables the definition of a relation? What constructs allow modification of relation instances? (JNTU Apr/May 2009)
2. Consider the following database. Employee (employee-name, street, city) Works (employee-name, company-name, salary) Company (company-name, city) Manager (employee-name, manager-name) Give an expression in the relational algebra, the tuple relational calculus, and the domain relational calculus, for the following query. Find the names of all employees who work for estate bank. (JNTU Apr/May 2009)
3. (a) What is a relational database query? Explain with an example. (b) What are the SQL constructs to modify the structure of tables, views and to destroy the tables and views? (JNTU Apr/May 2009)
4. (a) What is a relational database query? Explain with an example. (b) Explain the following fundamental operations of relational algebra. select project set rename. (JNTU Apr/May 2009)
5. Explain the historical perspective of DBMS (May 08, Apr 05, Feb 07)
6. Discuss the basic issues in the design of an ER database schema (Nov 06,Feb 07)
7. Explain database,dbms,enit iy, r elationships (Apr 05)
8. Explain the difference between weak entity and strong entity set? How to represent the strong and weak entity sets through E - R diagram. (Apr 03, Nov 06)
9. Draw an ER diagram for Departmental store after determining the entities and relation
ships that exist between these entities. Also construct a tabular representation of the
entit ies and relation ships. Are there any attribute in each entity set that would.
(Apr 03)
10. What is an ER model? Explain entity and entity set with examples. (Feb 07, Apr 02)
11. Explain with ER diagram and airline reservation system identify the entities, attributes
and relation ship exist among entit ies. (Apr 02)
12. Construct an entity-relationship diagram for the database of a hospital with a set of c
patients and a set of medical doctors with each patient. Also transform the E -r diagram
into relational database scheme. (Apr 02)
Unit III
1. (a) Explain in detail the 2 ways of executing pipeline? (b) Write the SQL expressions for the following relational database? [6+10] sailor schema (sailor id, Boat id, sailorname, rating, age) Recerves (Sailor id, Boat id, Day) Boat Schema (boat id, Boatname, color) i. Find the age of the youngest sailor for each rating level? ii. Find the age of the youngest sailor who is eligible to vote for each rating level with at lead two such sailors? iii. Find the No.of reservations for each red boat? iv. Find the average age of sailor for each rating level that at least 2 sailors. (JNTU Apr/May 2009)
2. (a) Define query processing and briefly explain the steps involved in it? (b) Write queries for the following using the given information Emp Name DOB DOJ Emp Salary Bonus DOR Buelin 06-12-1983 07-08-2005 15000 600 07-08-2055 Andy 12-01-1970 06-12-1973 20000 1200 06-12-2043 Lubber 07-08-1985 12-04-2006 13000 500 12-04-2056 Zobra 08-02-1960 07-03-1982 25000 1500 07-03-2032 (a) Find total salary of employees from emptable? (b) Find months between employee DOJ and DOR from emp-schema? (c) Create new salary table using the ampno, empname, and empsalary from existing table? (C)Arrange empnames in ascending and descending order? (JNTU Apr/May 2009)
3. (a) Explain in detail the 2 ways of executing pipeline? (b) Write the SQL expressions for the following relational database? [6+10] sailor schema (sailor id, Boat id, sailorname, rating, age) Recerves (Sailor id, Boat id, Day) Boat Schema (boat id, Boatname, color) i. Find the age of the youngest sailor for each rating level? ii. Find the age of the youngest sailor who is eligible to vote for each rating level with at lead two such sailors? iii. Find the No.of reservations for each red boat? iv. Find the average age of sailor for each rating level that at least 2 sailors. (JNTU Apr/May 2009)
4. What is Normalization? Discuss what are the types? Discuss the 1NF, 2N (JNTU Apr/May 2009)
5. Explain the structure of relational model. (Nov 06)
6. Explain the architecture of a RDBMS with block diagram. (Nov 02)
7. Explain the term‘s relation schema and relation instance. (Sep 06, Dec 02)
8. Define the following terms (Nov 02)
Primary Key and Foreign Key
9. What is a foreign key constraint? Why are such constraints important? ( Nov 06)
6. What is referential integrity (Nov 06)
10. What is the difference between a candidate key and the primary key for a given relation?
What is super key? (Aug 06, Nov 02)
11. Define the following terms with examples:
i. Relation ii. Cardinality relation iii. Super Key iv)candidateKey
(Sep 06, Nov 06)
12. Write short notes on: (Apr06, Apr 05)
(i) Key constraints (ii) General constraints (iii) Relational calculus.
13. Explain the following terms clear ly: (Dec 02)
i. Relation schema ii. Relational database schema iii. Domain iv. Relaiton cardinality v. Relation degree
14.What do you mean by domain constraint? Explain with the help of an example .(Dec
02)
14. What is a view? Explain the a views in SQL? . (May 2008)
15.What are views? Discuss the problems encountered in modifying database through
views? (Apr 04, Dec 02)
16. List reasons why we may choose to define a view. (Dec 02)
15. List the major problems with processing update operations expressed in terms of
views (Dec 02)
17. Define the division operation in relational algebra. Show that it can be derived from the
primitive operations defined in he relational algebra. (Aug 08, Sep 06)
18. Explain the operations select, project and join with suitable examples.
ii. Compare the two relational calculi. (Nov 02)
19. Explain the following term Relational Database Query (Nov 02)
20. Explain basic unary and set operation in Relational Algebra (Apr 03)
21. Explain different join operations. (ANNA UNV – 03)
22. Define the concept of Aggregation. Give examples of where this concept is useful.
(Dec 02, Jan 03)
23. Discuss the role of relational algebra equivalences in query optimization. (Apr 05)
24. Consider the following database. For each of the following quer ies, given an expression in relational algebra, the tuple relation calculus and the domain relational calculus.
Employee (employee_name, street, city)
Works (employee_name, company_name, salary)
Company (company_name, city) Manages (employee_name, manage_name)
i. Find the names of all employees who work for First Bank corporation.
ii. Find the names and cities of residence of all employees who work for that bank. iii. Find the name, street addresses and cit ies of residence of all employees who work for
that bank and earn more than $10,000 per annum.
iv. Find the names of all employees who do not work for that bank. v. Assume that companies may be located in several cit ies. Find all compa nies located
in every city in which small bank. Corporation is located. (Apr 04, Dec 02)
25. Consider the following Schema for a COMPANY database
Employee(Name, SSN, Address, Sex, Salary, DNumber) Department (Dname, Dnumber, MGRSSN, MGRSTART_date)
DEPT_LOCATIONS (DNAUMBER, DLOCATIONS)
PROJECT(PROJECT_NAME, PNMUBER, PLOCATION,, DNUMBER)
WORKS_ON (ESSN, PNUMBER,HOURS) DEPENDENT (ESSN, DEPENDENT- NAME, SEX, BDATE, RELATIONSHIP)
WRITE THE QUERIES IN RELATIONAL ALGEBRA
1. RETRIEVE ALL EMPLOYEES WHO EITHER WOPRK IN DEPARTMENT 4
AND MAKE OVER 25000 PER YEAR OR WORK IN DEPARTMENT 5 AND MAKE OVER 30000
2. RETRIEVE THE SSN OF ALL EMPLOYEES WHO EITHER WORK IN DEPT 5
OR DIRECTLY SUPERVISE A EMPLOYEE WHO WORKS IN DEPT 5
3. RETRIEVE THE NAME AND ADDRESS OF ALL EMPLOYEES WHO WORK FOR THE REASERCH DEPT.
4. LIST ALL THE PROJECTS ON WHICH EMPLOYEE SMITH IS WORKING
(AUG 2008)
26. How many dist inct tuples are in a relational instance with cardinality 22? (Nov 06)
27. Is QBE based upon relational algebra, tuple relational calculus, or domain relational
calculus? Explain briefly. (Apr 03, Apr 04)
28. IS QBE relationally complete? Explain briefly. (Apr 03)
29. What is QBE? Explain. Give its advantages over other. (Apr 03, Aug 08)
Unit IV
1. (a) What is Normaliztion?give types of normalization (b) What are the advantages of normalized relations over the un normalized rela- tions? (JNTU Apr/May 2009)
2. Explain the FD and MVD with examples? (JNTU Apr/May 2009)
3. (a) Define BCNF. How does BCNF differ from 3NF? Explain with an example. (b) Explain 3nf? Give one example? (JNTU Apr/May 2009)
4. Consider the relation R(A,B,C,D,E,F) and FDs A ! BC, F ! A,C ! AD ! E, E ! D AD is the decomposition of R into
R1(A,C,D) R2 (B,C,D) and R3 (E,F,D) loss less? Explain the requirement of Loss less decomposition? (JNTU Apr/May 2009)
5. What is an SQL? Explain the various aspects of SQL .(Apr 05)
6. Explain the term Dynamic SQL (Sep 06)
7. Explain the following terms: (Sep 06)
i. Relational database query ii. Query language iii. SQL
8. What is a subquery?. Explain with examples. (Sep, Nov 06, May 08)
9. Explain nested queries with example sin SQL. (Sep 06)
10. With an example, explain the optimization of nested sub quer ies. (Nov 06)
11. What is a relation database query? Explain with an example? (Feb 07,Aug 08)
12. Consider the following SQL query for a bank database
Select T.branch-name from branch T, branch S where T.Assets > S.assests and S.branch-city=‖HYDERABAD‖
Write an efficient relational algebra expression that is equivalent to the query
(Apr 05, Aug 08)
13. What is an embedded SQL? Give examples. (Apr 04,Aug 08)
14. Explain the three set manipulation constructs available in SQL with examples (Sep 06)
15.Explain the various types of aggregate functions with suitable examples in SQL
(Apr 05, Sep 06)
16. Consider the following schema given. The primary keys are underlined
Sailors (Sailor-id, sailor-name, sailor-rating, sailor-age) Boats(boat-id, boat-t ime, boat-color)
Reserves(sailor-id, boat-id, day)
Write the Nested quires in SQL.
i. Find the names of sailors who have reserved boat number 120 ii. Find the names of sailors who have reserved a green boat
iii. Find the names of sailors who have not reserved a green boat
iv. Find the names of sailors with the highest rating. ii. Explain the GROUP BY and HAVING clauses. (Apr 05)
17.How can updates and null values described in views. Give suitable examples .(Feb 07)
18.What are the ways by which a database could be modified. Give examples.
(Sep 06, Aug 08)
19. What are the SQL constructs to modify the structure of tables, views and to destroy the
tables and views? (Feb 07, Nov 06)
20. Discuss the use of triggers and cursors with examples. (Dec 02)
21. Consider the following relation schema pertaining to a students database: (GATE-
2005) Students(rollno, name, address)
Enroll(, name, address)
Enroll(rollno, courseno, coursename) Where the pr imary keys are shown underlined. The number of tup les in the student
and Enroll tables are 120 and 8 respectively. What are the maximum and minimum
number of tuples that can be present in (Student * Enroll), where ‗*‘ denotes natural join?
i. 8, 8 ii. 120, 8 iii. 960, 8 iv. 960, 120
22. Consider the set of relations shown below and the SQL query that follows.
Students: (Roll_number, Name, Date_of_birth)
Courses: (Course number, Course_name, Instructor) Grades: (Roll_number, Course_number, Grade)
SELECT DISTINCT name
from students, courses, grades WHERE students, roll_number = grades.roll_number and Courses.Instructor = Korth
and Courses.Course_number = Grades.Course_number
and Grades.grade = A (GATE 04)
23. Consider the relation enrolled (student,course) in thwihc studen,course is the primary
key and the realt ion paid (student,amount) where student sis the pr imary key. Assume no null values and foreign keys or integrity constraints. Given the gollowin four
queries:
query1: select student from enrolled where student in(select student from paid)
query2: select student from paid where student in(select student from enrolled) query3: select E.student from enrolled E, paid P where E.student=P.student
query4:select student from paid where exists (select * from enrolled where
enrolled.student = paid.student) which one of the following statements is correct?
(a) all queries return idnetical row sets for any database
(b) query2 and query4 return identical row sets for all databas es but there exist databases for which query1 and query2 return different row sets.
(c) there exist dataases for which query3 returs strictly fewer rows than
query2(GATE - 2006)
24. Consider the set of relations shown below and the SQL query that follows.
Students: (Roll_number, Name, Date_of_birth) Courses: (Course number, Course_name, Instructor)
Grades: (Roll_number, Course_number, Grade)
SELECT DISTINCT name from students, courses, grades WHERE students, roll_number = grades.roll_number
and Courses.Instructor = Korth and Courses.Course_number =
Grades.Course_number
and Grades.grade = A
Which of the following sets is computed by the above query? i. Names of students who have got an a grade in all cours es taught by Korth
ii. Names of students who have got an a grade in all courses
iii. Names of students who have got an a grade in at least on of the courses taught
by Korth iv. None of the above (GATE - 2005)
i. (Dec 02)
25. In SQL, relations can contain null values, and comparison with null values are treated as
unknown, suppose all comparisons with a null value are treated as false. Which of the following pairs is not equivalent?
i. x = 5 not (not x = 5)
ii. x = 5 x > 4 and x <6, where x is an integer
iii. x not equal to 5 not (x = 5) None of the above
UNIT – V
1. (a) Define the concept of schedule for a set of concurrent transaction. Give a suitable example. [8] (b) Explain read-only, write-only & read-before-write protocols in serialazability. (JNTU Apr/May
2009)
2) What is normalization? Give types of normalization. What are the advantages of normalized relations over the un normalized relations?
(Feb 07,apr08)
3) Why are the certain functional dependencies called trivial functional dependencies. ii. Compute the closer of (Ft) for the following set F of functional dependencies
D Using the
functional dependencies compute the canonical cover Fc.
(May 03)
4) What is Normalization? Discuss the First and second and third normal forms, with examples.
ii. Why are the certain functional dependencies called trivial functional
dependencies.
(Apr 02, Nov 02,aug 2008) 5) Let R = (a, b, c, d, e, f) be a relation scheme with the following dependencies which
of the following is a key for R?
i. CD ii. EC iii. AE iv. AC (GATE -
1999)
6) Define query optimization and at what point during query processing does
optimization occur? . (May 2008)
7) Discuss the role of relational algebra equivalences in query optimization.
ii. Explain various steps involved in the query processing.
(Apr 05)
8) From the following instance of a relation schema R(A, B, C), we can conclude that:
A B C
1 1 1 1 1 0
2 3 2
2 3 2
i. A functionally determines B and B functionally determines C ii. A functionally determines B and B does not functionally determines C.
iii. B does not functionally determines C
iv. A does not functionally determines B and B does not functionally determines C.
(GATE -
2004)
9 . Consider the following functional dependencies in a database.
Ag
(Roll_number, Course- The relation (Roll_number, Name, Date_of_birth, Age) is
i. in second normal form but not in third nor mal form
ii. in third normal form but not in BCNF iii. in BCNF
iv. in none of the above (GATE - 2005)
10. Explain 3 NF? Give one example
(Feb 07) 11. What is Normalization? Discuss the first, second and thir d normal forms with
examples.
Explain why 4 NF is more desirable normal form that BCNF. (Sep 06, May 03) 12. Given relation R(Supplier, part, suppcity, quantity) and
part
is R in 2NF? 3NF? (Dec 02, Jan
03)
13. Define 3 NF. Give an example of relation 2 NF but not in 3NF. Transform the relation into relations in 3 NF.
ii. Discuss briefly about join dependency.
(Apr 02) 14. which one of the following g statements regarding normal forms is false?
a) BCNF is stricter than 3NF
b)lossless, dependency-preserving decomposit ion into 3NF is always possible
c)lossless, dependency-preserving decomposit ion into BCNF is always possible d) any relation with two attributes in is BCNF. (GATE - 2005)
15. A relation Empdtl is defined with attributes empcode (unique), name, street, city,
state and pincode. For any pincode, there is only one city and state. Also, for an given street, city and state, there is just one pincode. In normalization terms, Empdtl
is a relation in
i. 1NF only ii. 2Nf and hence also in 1Nf iii. 3Nf and hence also in 2NF and 1NF iv. BCNF and hence also in 3NF,
2NF, 1NF (GATE - 2004)
16. Relation R is decomposed using a set of functional dependencies, F, and relation S is
decomposed using another set of functional dependencies, G. One decomposit ion is definitely BCNF, the other is definitely. 3NF, but it is not known which is which. To
make a guaranteed identification, which one of the following tests should be used on
the decompositions? (Assume that the closures of F and G are available).
i. Dependency-preservation ii. Lossless-join iii. BCNF definit ion iv. 3NF definit ion (GATE -
2003)
17.
Decomposit ion is
i. not in 2NF ii. in 2NF but not 3NF iii. in 3NF but not in 2NF iv. in both 2NF and 3NF
(GATE - 2000)
18. The following relations are used to store data about students, courses, enrollment of
students in courses and teachers of courses. Attributes for primary key in each relation are marked by ‗*‘.
Students (rollno*, sname, saddr)
courses (cno*, cname) enroll(rollno*, cno*, grade)
teach(tno*, tname, cao*)
(cno is course number, cname is course name, tno is teacher number, tname is teacher name, sname is student name, etc.,)
For the relational database given above, the following functional dependencies hold:
(GATE - 1993)
i. Is the database in 3rd normal form (3NF)? ii. If yes, prove that it is in 3 NF. If not, normalize, the relations so that they are in 3
NF (without proving)
19. When are two sets of functional dependencies are equivalent? How can we determine
their equivalence? (Feb 07, Sep 06, Apr 05) 20. Use the axioms for funct ional and multivalued dependencies to show that the
following rules are sound.
(Apr 04) (i). the multivalued union rule (ii). the intersection rule (iii). the difference rule 21. Following set of functional dependencies for relatio n Scheme R = (, B, C, D, E)
Using the Functional Dependencies compute the Canonical over F c (Dec 02, Jan
03)
22. Then the decomposit ion of R into R1 (AB) and R2(CD) is
i. dependency preserving and lossless join ii. lossless join but not dependency preserving
iii. dependency preserving but not lossless join
iv. not dependency preserving and not lossless join (GATE -
2002) 23. 43. R(A, B, C, D) is a relation. Which of the following does not have a
lossless join, dependency preserving BCNF decomposition?
i.
iii. AB C, C AD iv. (GATE - 2002)
24. Explain about 4 NF? Give one example (Nov 06, Aug 08)
Explain why 4NF is more desirable Normal Form than BCNF. (May 03, Aug 08)
ii. Consider the relation R(A,B,C,D,E) and FDs. A - >BC
C - > A
D - > E F - > A
E - > D
Is the Decomposition R in to R1 (A,C,D) and R3 (E,F,D) loss less?
Explain the requirement of lossless decomposition. Discuss the BCNF and 4NF Normal Forms with examples. (Nov 02,
Aug 08)
25. Define BCNF? How does BCNF differ from 3NF. Explain with an example.
26. Explain about 5 NF? Give one example (Nov 06)
27. Explain why the PJNF is more desir able normal form than 4NF.
ii. Explain Domain Key Normal Form (DKNF) with Example.
(Apr 05) 28. Explain why DKNF is highly desirable normal form, yet one that is difficult to
achieve in practice.
i. Let R = (A,B,C,D,E) and let M be the following set of multivalued dependencies.
A-> > BC
B-> > CD
E- > > AD List the nontr ivial dependencies in M+
ii. Describe the properties of normalized and un-normalized relations.
(Apr 04)
UNIT – VI
1. (a) Define dynamic database. Explain phantom problem by considering suitable example. [8] (b) Explain B+ tree locking used for concurrency controlwith suitable example. (JNTU Apr/May 2009)
2. (a) Write the locking compatibility matrix used for multiple granularity? Explain with suitable example. [8] (b) write Thomas write rule. How the rule differ from timestamp based rule. (JNTU Apr/May 2009)
3. (a) What are the types of failures of a system. [6] (b) What are the reasons strict 2PL used in many database systems [5] (c) How the use of 2PL would prevent interference between the two transactions.
[5] (JNTU Apr/May 2009)
4. (a) Explain how a system crash can recovered using ARIES Algorithm. [8] (b) Write a short notes on i. WAL Protocol ii. Check pointing (JNTU Apr/May 2009)
5. Write a note on the properties of transactions. (Feb 07, May 05, Aug 08)
6. Explain the concept of transaction atomicity. (Feb 07)
7. What is a transaction? In what ways is it different from an ordinary program(like c)
(Sep 06, Nov
02) 8. with suitable example wxaplin ACID properties (Nov 06, Aug
08)
9. Define the concept of a schedule for a set of concurrent transactions. give a sutiable
example.
(Apr 05) 10. Give a note on crash recovery (Sep 06, Aug 08)
11. Describe the two phase locking protocol with the help of an example (Apr 04, Apr
02, Aug 08)
12. Explain different locking techniques for concurrency control. (Apr 03, Sep 02, Aug
08)
13. What is indexing ? Explain with an example. . (May 2008)
14. Explain about query processing. . (May 2008)
15. Show that the following equivalences hold and explain how they can be applied to
improve the e_ciency of certain updates. (a) (r1 [ r2) [ r3 = r1 [ (r2 [ r3)
(b) r1 [ r2 = r2 = r2 [ r3
(c) σp(r1 - r2) = σp(r1) - σp(r2) . (May 2008)
16. How does reovery manager ensure atomidcity of trnasaction? how does it ensure
durablity.
(Feb 07) 17. What are the two tables used in crash recovery along with log record. expla in with
suitable wxamples.
(Feb 07) 18. Define the conept of schedule for a set of concurrent transaction. Give a suitable
example.
(Feb 07, Nov
06) 19. Define these terms atomicity, consistency, isolation, dur ability, schedule, blind
write.
(Feb 07, Apr
04)
20. Explain two phase locking with algorithms. (Sep 06,May
05)
21. what are the trnasaction isolation levels in SQL (Nov 06)
22. explain how concrurrency exectuion of trnaactions improves overall system performance. (Nov 06)
23. How the use of 2Pl would prevent interference between the two trnasactions.
(Nov 06)
24. Write a note on multiversion concurrency control.
(Nov 06)
25 Define transactiona nd schedule with suitable examples (Nov 06)
26. Breifly explain why recovery is needed? (Apr 04)
27. What are the different types of systwem failures?
(Apr 04)
28. Explain optimisit c concurrency control under time-stamp.
(Apr 04)
29. What are the basic properties of a transaction? Explain these properties with the help
of an example?
(Apr 04) 30. How the lock-based concurrency control performance is mesasured (Nov 04)
31. Explain how system crash occurs? (May 04)
32. state and justify ―Thomnas write rule‖ (Apr 04)
33. How does a sysem recover froma crash (Apr 04)
34. What ate the fields in update log record. Explain the use of each filed. (Nov 04)
35. Describe each of the following i. Two phase Locking protocol ii. Check printing.
(Nov 04) 36. Explain the difference between system crash and media failure. (Apr 03)
37. Explain Timestamp order ing with an example. (Apr 03)
UNIT - VII
1. Explain about Fixed-Length file organization with an example. (JNTU Apr/May 2009)
2. (a) Explain about Fixed-Length Representation in detail. (b) Explain about Byte-String Representation. in detail. (JNTU Apr/May 2009)
3. (a) Explain about tertiary storage media in detail. (b) Explain about Buffer Manager. (JNTU Apr/May 2009)
4. (a) Explain about tertiary storage media in detail. (b) Explain about Buffer Manager. [8 (JNTU Apr/May 2009)
5. How does the two pahase locking protocol ensures serializability (Feb 07, Aug
08)
6. write short notes on recoverability adn ser ializabit lity. (Nov 06,Aug 2008)
7. How does two phase locking protocol ensures ser ializability. (Feb 07,
Aug 08)
i. Explain read-only, write-only and read-before-write protocols in ser ilaizability. (Nov 06
8. Discuss how Serializabilt iy is used to enforce concurrency control in a database system. Why Serializabilt iy is considered too restr ict ive as a measure of
correctness for schedules. (May 04)
9. Define the terms conflict serializable schedule and view ser ializable schedule.
(Feb 07)
10. What are the merits and demerits if using fuzzy dumps for media recovery?
i. (Nov 06,May 2008)
11. Consider the relation R(A,B,C,D,E,F) and FD‘s A ! BC F ! A C ! A D ! E E ! D is the decomposition of R into R1 (A,C,D), R2 (B,C,D) and R3
(E,F,D) loss less? Explain the requirement of loss less decomposition. (May 2008)
12. When does a system recover from crash? In what order must transaction be undone and
redo? Why is this order important?
(Feb 07)
13. what is the difference between system crash and media failure (Sep 06)
14.What are the different filed of log record?
(Feb 07)
15.write short notesa on checkpointing and media recovery
(Sep 06)
16. Explain in detail the ARIES recovery method. (Sep 06)
17. Explain 3 main proerties of AIRES alfgorithm. (Sep 06, Nov
06)
18. Explain the phases of ARIES algorithm. (Nov 06)
19. How is checkpointing done in ARIES. (Nov 06)
20. How the use of 2Pl would prevent the interference between the two transactions.
(Nov 06)
21. Explain the role of lock manager and implementing lock and unlock requests according to
2PL (Apr 05)
22. Can a second end checkpoint record be encountered during analysis phase? (Apr
05)
23. What steps are taken for the recovery during normal execution of transactions? (Apr
05)
24. Compare the shadow(D) paging recovery scheme with the log -based recovery
schemes in terms of case of implementation and overhead cost.
(May 05)
25. What is the oldest record that we need to retain? (May 05)
26. If a bounded amount of stable storage is needed for the log, how can we ensure that
there is always enough stable storage to hold all log records written during restart?
(May 05)
27. Explain the t ime-stamp based protocol for concurrency control in DBMS.
Explain the various reading and writ ing estimations with the help of examples.
(Nov 04)
28. Explain the role of concurrency control in databases. Also describe the basic tree
protocol
that ensures serializability of concurrent transactions. (Nov 04)
29. Define the concept of a schedule for a set of concurrent transactions. Give a suitable
example. (
May 05)
30. Explain how does granularity of locking affect the performance of concurrency
control algorithm. (May
05)
31. If a system fails repeatedly during recovery, what is the maximum number of log records that can be written (as a function of number of update and other log records
written before crash) before restart completes successfully.
(May 05)
32. Discuss the un-do and re-do operations and the recovery techniques that use each.
(May 05)
33. Explain the purpose of the check (D) point mechanism. (Apr 04)
Unit-VIII
1. Explain the distinction between closed and open hashing. Discuss the relative merits of each technique in database applications. (JNTU Apr/May 2009)
2. Construct a B+
−tree for the following set of key values. (2,3,5,7,11,17,19,23,29,31) Assume that the tree is initially empty and values are added in ascending order. Construct B+
−tree for the cases where the number of pointers that will fit in one node is as follows. (a) four (b) six (c) eight [1 (JNTU Apr/May 2009)
3. Explain about the B -tree and the structure of B + tree in detail with an example.
(JNTU Apr/May 2009)
4. Explain all the operations on B+
−tree by taking a sample example. (JNTU Apr/May 2009)
5. Explain about file organization in detail.
(May 2008,Feb 07)
6. Explain how the allocation of records to blocks affects database system performance
significantly. (Feb 07)
7. What is the difference between pr imary index and secondary index? Explain in detail.
(Feb 07)
8. Explain the difference between and secondary indices. (April 05)
9. Design a variant of the hybrid merge join algorithm for the case where both relations
are not physically sorted, but both have a sorted secondary index on the join attributes. (April 03)
10. Explain the difference between each of the following: (April 03) primary versus secondary indexes;
ii.Dense versus sparse indexes;
iii.clustered versus unflustered indexes. If you were about to create an index on a
relation, what considerations would guide your choice with respect to each pair of properties listed above?
11. . Explain cluster ing indices. Comapre with unclustered indieces.
(May 06)
12. Compare the ordered indexing with hashing
(Nov 06)
13. Discuss the difference between index sequential and hashed file organizations.
Compare their storage and access efficiencies. List the applications where each of the
file organization is suitable.
(April 05)
14. Define the following terms (April 04)
Dense index Blocking factor . Spanned records. (April
04,dec04)
15. What is the difference between a file organizations and an access method?
(Dec 04)
16. Why is accessing a disk block expensive? Discuss the time components involved in
accessing a disk block.
(Dec 04)
17. How does multilevel indexing improve the performance of searching an index file.
(Nov 03)
18. Discuss about selections using Indices. (Nov 04)
19. If an index contains data records as data entries, is it clustered or unclustered? Dense or sparse?
(May 05)
20. Consider the two internal organizations for heap files (using lists of pages and a
directory of pages). Describe them briefly and explain the tradeo -offs. Which
organization would you choose if records are variable in length?
(Nov 04)
21. Consider the two internal organizations for heap files (using lists of pages and a
directory of pages).Can you suggest a single page format to implement both internal file organizations?
(April 04)
22. Explain insert ion, deletion in hash file organization. (Dec
04)
23. Discuss about the following: i.Hybrid Hash – Join ii. complex joins. (April
03)
24. Explain about hash indices with an example (Feb
07)