Professional Documents
Culture Documents
2 MARKS WITH ANSWERS AND PART-B QUESTIONS ONLY
2 MARKS WITH ANSWERS AND PART-B QUESTIONS ONLY
2 MARKS WITH ANSWERS AND PART-B QUESTIONS ONLY
JAYABHARATHI,AP/IT,APEC
UNIT I – RELATIONAL
DATABASE PART - A
(2 MARKS)
The main purpose of going for database approach is to overcome problems faced in traditional
file- processing approach. The important characteristics of the database approach are the
following:
1. Self-Describing Nature of a Database System
2. Insulation between Programs and Data, and Data Abstraction
3. Support of Multiple Views of the Data
4. Sharing of Data and Multiuser Transaction Processing
1
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
3. Providing multiple user interfaces
4. Enforcing integrity constraints.
5. Providing backup and recovery
2
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
6. List the components of DBMS.
Dr Edgar F. Codd, after his extensive research on the Relational Model of database systems came
up with twelve rules of his own, which according to him, a database must obey in order to be regarded as a
true relational database.
These rules can be applied on any database system that manages stored data using only
its relational capabilities. This is a foundation rule, which acts as a base for all the other rules.
Instance: Collection of data stored in the data base at a particular moment is called
an Instance of the database.
Schema: The overall design of the data base is called the data base schema.
3
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
4
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
Key attribute: An entity type usually has an attribute whose values are distinct from
each individual entity in the collection. Such an attribute is called a key attribute.
Value set: Each simple attribute of an entity type is associated with a value set that specifies the set
of values that may be assigned to that attribute for each individual entity.
DDL: Data base schema is specified by a set of definitions expressed by a special language
called a data definition language.
DML:
A data manipulation language is a language that enables users to access or manipulate data
as organized by the appropriate data model.
27. Define tuple and attribute.
Attributes: column headers
Tuple: Row
5
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
Physical level. The lowest level of abstraction describes how the data are actually stored.
Logical level. The next-higher level of abstraction describes what data are stored in the
database, and what relationships exist among those data.
View level. The highest level of abstraction describes only part of the entire database. The
system may provide many views for the same database.
6
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
rename.
7
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
Here X is termed as a determinant set and Y as a dependent attribute. Each value of X is associated
precisely with one Y value.
8
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
4. Explain the basic architecture of a database management system with neat block diagram.
5. Explain select, projection, Cartesian product and join operations in relational algebra with an
example.
9. Consider the relation student (reg.no. , name, mark and grade). Write embedded dynamic
SQL program in C language to retrieve all the students records whose mark is more than 90.
9
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
PART - A (2 MARKS)
1
0
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
9. Define the terms:
i) Key attribute
ii) Value set
Key attribute: An entity type usually has an attribute whose values are distinct from each individual
entity in the collection. Such an attribute is called a key attribute.
Value set: Each simple attribute of an entity type is associated with a value set that specifies the set
of values that may be assigned to that attribute for each individual entity.
11
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
18. What is the use of integrity constraints?
Integrity constraints ensure that changes made to the database by authorized users do not result in a
loss of data consistency. Thus integrity constraints guard against accidental damage to the database.
12
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
4. Construct an ER diagram for a car-insurance company whose customers own one or more cars
each. Each car has associated with its zero to any number of record accidents. State any
assumptions you make.
5. What is normalization? Explain normalization techniques using functional dependencies
with relevant examples.
6. Compare and contrast 3NF and BCNF.
7. Explain the multi-valued dependency and fourth normal form with example.
8. Explain the Join dependency and fifth normal form with example.
9. Draw an ER diagram for Hospital management system.
10. What is Functional Dependency? Explain types and properties of FD‟s.
11. Construct an ER diagram for university registrar’s office. The office maintains data about each
class, including the instructor, the enrollment and the time and place of the class meetings. For each
student class pair a grade is recorded. Determine the entities and relationships.
12. Define generalization and aggregation. Demonstrate generalization and aggregation using E-R
diagram.
13
. DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
UNIT III – TRANSACTIONS
PART - A (2 MARKS)
14
. DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
15
. DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
20. What is the time stamp associated with each data item?
W-timestamp (Q) denotes the largest time stamp if any transaction that executed WRITE
(Q) successfully.
R-timestamp (Q) denotes the largest time stamp if any transaction that executed READ
(Q) successfully.
16
. DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
Deadlock Avoidance:
The system dynamically considers every request and decides whether it is safe to grant it at
this point,
The system requires additional prior information regarding the overall potential use of each
resource for each process.
Allows more concurrency.
25. What is Concurrency Control?
Process of managing simultaneous execution of transactions in a shared database, to ensure the Serializability
of transactions, is known as concurrency control.
17
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
18
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
UNIT IV –IMPLEMENTATION TECHNIQUES
PART - A (2 MARKS)
Merits
Insertion in B+ tree is easy.
Deletion in B+ tree is simple than B tree.
Demerits:
Requires redundant storage for search-key values every search key appears in some leaf
node. Several are repeated in non-leaf node.
Lookup on B+-tree requires traversal of a path from root of tree to some leaf node.
S.
Static hashing Dynamic hashing
No
1. Numbers of buckets are fixed Numbers of buckets are not fixed
2. As the file grows, performance de- As the file grows, performances do
creases. not
3. degrade.
Space overhead is more
4. Space overhead is less
Do not use bucket address table
5. Bucket address table is
Open hashing and closed hashing
are
6. forms of it. used
Implementation is simple Extendable hashing and linear
7.
It is less attractive techniques hashing are forms of it.
8.
Overflow chaining is used Implementation is complex
It is more attractive techniques
Overflow chaining is not used
19
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
20
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
10. What is a B+ tree?
A B+ tree is an n-array tree with a variable but often large number of children per
node. The root may be either a leaf or a node with two or more children. A B+ tree can be
viewed as a B-tree in which each node contains only keys (not key-value pairs), and to
which an additional level is added at the bottom with linked leaves.
21
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
S.
B+ tree B- tree
No
1. B+ tree leaf node data are ordered B tree the leaf node cannot store
in a sequential linked list. using linked list.
2. B +tree store redundant search key B tree store non-redundant search
key
3. B+-tree data store only leaf nodes. B tree search keys and data stored in
internal or leaf nodes
4. Insertion of a B+ tree is not Insertion of a B tree is more
complicated compli cated
22
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
1. What are the various ways of organizing records in files and explain any one file organization in detail.
2. Explain how the RAID system improves performance and reliability.
3. Describe the structure of B+ tree and list the characteristics of B+ tree.
4. What is RAID? Briefly explain different level of RAID.
5. Construct B+ tree to insert the following (order of tree is 3) 26, 27, 28, 3, 4, 7, 9, 46, 48, 51, 2, 6.
6. Describe briefly about indexing and hashing.
7. With neat diagram, describe about magnetic disks.
8. Give brief notes on overviews of physical storage media.
9. Explain in detail about internal hashing Techniques.
10. Discuss in detail about cluster and multilevel indexes.
11. By considering an example, show how to reduce access time with primary index.
12. When does a collision occur in hashing? Illustrate various collision resolution techniques.
13. Illustrate with an example for insertion and deletion operations on a B- Tree.
23
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
UNIT V – ADVANCED TOPICS
PART - A (2 MARKS)
1. What are the two approaches to store a relation in the distributed database?
Replication: System maintains several identical replicas (copies) of the relation and stores each replica at a
different site.
Fragmentation: System Partitions the relation into several fragments and stores each fragment at a
different site.
2. Define Distribute Database.
The computers in a distributed system communicate with one another through various communication media,
such as high-speed networks or telephone lines. They do not share main memory or disk. The computers in
distributed system are referred by names such as sites or nodes.
3. What are the types of Transactions?
Distributed database system supports two types of transactions.
Local transaction: It is one that accesses data only from site where that transaction was
initiated.
Global transaction: It is one that either accesses data from a site other than the site where that
transaction was initiated or accesses data from several different sites.
4. Difference between homogeneous and heterogeneous database.
S.
Homogeneous Database Heterogeneous Database
No
Different nodes may have same Database application used at each location must
1.
hardware & software be same or compatible.
Database application used at each Database application used at each location must
3.
location must be same or be incompatible.
compatible.
24
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
25
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
26
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
Java Language Binding
27
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
XML Database is used to store huge amount of information in the XML format. As the use of XML is
increasing in every field, it is required to have a secured place to store the XML documents. The data
stored in the database can be queried using XQuery, serialized, and exported into a desired format.
23. What are the types of XML databases?
There are two types of XML databases.
1. XML-enabled database
2. Native XML database(NXD)
23. What are the attributes of XML?
XML elements can have attributes. By the use of attributes, we can add the in- formation
about the element.
XML attributes enhance the properties of the elements.
24. Difference between HTML and XML.
28
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
Simple Type
The simple Type allows you to have text-based elements. It contains less attributes, child elements, cannot
be left empty.
Complex Type
The complex Type allows you to hold multiple attributes and elements. It can contain additional sub
elements and can be left empty.
XQuery is a standardized language for combining documents, databases, Web pages and al- most anything
else. It is very widely implemented. It is powerful and easy to learn. XQuery is replacing proprietary
middleware languages and Web Application development languages.
XQuery is replacing complex Java or C++ programs with a few lines of code. XQuery is simpler to work
with and easier to maintain than many other alternatives.
29
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
DTD stands for Document Type XSD stands for XML Schema
1)
Definition. Defi- nition.
XQuery is a functional language. It is used to retrieve and query XML based data.
XQuery is expression-oriented programming language with a simple type sys- tem.
XQuery is analogous to SQL. For example: As SQL is query language for data- bases, same
as XQuery is query language for XML.
XQuery is XPath based and uses XPath expressions to navigate through XML documents.
XQuery is a W3C standard and universally supported by all major databases.
30
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
31
DBMS NOTES PREPARED BY MRS.S.JAYABHARATHI,AP/IT,APEC
32