Beruflich Dokumente
Kultur Dokumente
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
2
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
10. Define the terms Physical Schema and Logical Schema.
Physical schema: The physical schema describes the database design at the physical level, which
is the lowest level of abstraction describing how the data are actually stored.
Logical schema: The logical schema describes the database design at the logical level, which
describes what data are stored in the database and what relationship exists among the data.
4
20. Define null values.
In some cases a particular entity may not have an applicable value for an attribute or if we
do not know the value of an attribute for a particular entity. In these cases null value is used.
21. Define the terms i) Entity type ii) Entity set
a. Entity type: An entity type defines a collection of entities that have the same attributes.
b. Entity set: The set of all entities of the same type is termed as an entity 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.
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
31. What is a candidate key?
Minimal super keys are called candidate keys.
Physical level. The lowest level of abstraction describeshowthe 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
39. What is functional dependency?
Functional dependency is a relationship that exists when one attribute uniquely determines
another attribute.
Here X is termed as a determinant set and Y as a dependant attribute. Each value of X is associated
precisely with one Y value.
7
PART – B (BIQ QUESTIONS)
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.
8
UNIT II – DATABASE DESIGN
PART - A (2 MARKS)
a) One to one
b) One to many
c) Many to one
d) Many to many
9
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.
10
19. What is normalization?
Database normalization is the process of organizing the fields and tables of a relational database to
minimize redundancy and eliminate dependency. Normalization usually involves dividing large tables
into smaller (and less redundant) tables and defining relationships between them.
11
PART – B (BIQ QUESTIONS)
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.
12
UNIT III – TRANSACTIONS
PART - A (2 MARKS)
13
10. Draw the states of Transaction.
14
19. Define the phases of two phase locking protocol
Growing phase: a transaction may obtain locks but not release any lock.
Shrinking phase: a transaction may release locks but may not obtain any new locks.
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.
21. What are the three types of intent Lock?
Intent Shared(IS)
Intent Exclusive (IX)
Shared Intent Exclusive(SIX)
15
The goal is to ensure that at least one of the necessary conditions for deadlock can never hold.
Deadlock Avoidance:
The system dynamically considers every request and decides whether it is safe to grant it at this point,
apriori information regarding the overall poten- tial use of each
The system requires additional
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.
16
PART – B (BIQ QUESTIONS)
16. Why concurrency control is needed? Explain the problems that would arise when concurrency
control is not provided by the database system.
17
UNIT IV –IMPLEMENTATION TECHNIQUES
PART - A (2 MARKS)
Mertis
Insertion in B+tree is easy.
Deletion in B+ tree is simple than B tree.
Demeris :
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. Open hashing and closed hashing are Bucket address table is
forms of it. used
6.
Implementation is simple Extendable hashing and linear
7.
It is less attractive techniques hashing are forms of it.
8.
Implementation is complex
Overflow chaining is used
It is more attractive techniques
Overflow chaining is not used
18
5. Difference between dense index and parse index.
2. Dense indices are faster than sparse Sparse indices are slower than dense
An index on a set of fields that includes An index that is not a primary key
1. the unique primary key for the field
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 compli-
compli- cated cated
20
PART – B (BIQ QUESTIONS)
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.
21
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 com- munication
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 transac- tion was
initiated.
than the site where that
Global transaction : It is one that either accesses data from a site other
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 be
1.
hardware & software same or compatible.
Database application used at each Database application used at each location must be
3.
location must be same or compatible. incompatible.
Disadvantages :
Software development cost
Greater potential for bugs
Increased processing overhead
22
6. List out the reasons for the development of distributed database.
In Centralized system data is stored on a single computer. If that computer fails, complete system
fails.
In client server system also the data is stored on server. If server fails, complete system fails.
7. Define Transparency.
The user of a distributed database system should not be required to know either where the data are physically
located or how the data can be accessed at the specific local site. This characteristic called data transparency.
8. Define Vertical Fragmentation.
Vertical fragmentation splits the relation by decomposing the schema R of relation „r‟. Vertical fragmentation of
r(R) involves the definition of several subsets of attributes R1, R2, ..., Rn of the relation R so that
R = R1 U R2 U R3, U ..., U Rn
9. Define Horizontal Fragmentation.
In horizontal fragmentation, a relation „r‟ is partitioned into a number of subsets r1, r2, ..., rn. Each
tuple of relation „r‟ must belong to at least one of the fragments, so that the original rela- tion can be
reconstructed, if needed.
In general, a horizontal fragment can be defined as a select on the global relation „r‟. The predi- cate Pi
is used to construct fragment ri.
r = P (r)
10. What is Object Oriented Database?
An object-oriented database is a database that subscribes to a model with information rep- resented
by objects. Object-oriented databases are a niche offering in the relational database management
system (RDBMS) field and are not as successful or well-known as mainstream database engines.
11. Draw the representation Object Oriented Database.
23
13. What is Object?
Object consists of entity and attributes which can describe the state of real world object and action
associated with that object.
14. List out the Characteristics of Object. Some
important characteristics of an object are:
Object name
Object identifier
Structure of object
Transient object
Persistent objects
24
22. What is XML Database?
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 docu- ments. 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.
25
Simple Type
The simple Type allows you to have text-based elements. It contains less attributes, child ele-
ments, and 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.
28. Difference between DTD and XSD.
DTD stands for Document Type XSD stands for XML Schema Defi-
1)
Definition. nition.
DTD provides less control on XML XSD provides more control on XML
8)
structure. structure.
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 sim- pler to
work with and easier to maintain than many other alternatives.
30. What are the features of XQuery?
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.
26
31. Difference between XQuery and XPath.
Return - It is used to specify what to return (gets evaluated once for every node).
33. What is Information Retrieval (IR)?
Information retrieval (IR) systems use a simpler data model than database sys- tems
Information organized as a collection of documents
Documents are unstructured, no schema
Information retrievallocates relevant documents, on the basis of user input such as keywords or
example documents
34. What is Web Crawling?
Crawling is done by multiple processes on multiple machines, running in parallel
Set of links to be crawled stored in a database
New links found in crawled pages added to this set, to be crawled later
Indexing process also runs on multiple machines
Creates a new copy of index instead of modifying old index
Old index is used to answer queries
After a crawl is “completed” new index becomes “old” index
27
PART – B (BIQ QUESTIONS)
28