Dbms Question Bank2 Marks 16 Marks
Dbms Question Bank2 Marks 16 Marks
COM
del.
Processing.
odel, ER diagrams.
TEXT BOOK:
1. Ramez Elmasri and Shamkant B. Navathe, “Fundamentals of Database Systems”, Fifth
Edition, Pearson Education, 2008.
REFERENCES:
1. Abraham Silberschatz, Henry F. Korth and S. Sudharshan, “Database System Concepts”, Sixth
Edition, Tata Mc Graw Hill, 2011.
2. C.J.Date, A.Kannan and S.Swamynathan, “An Introduction to Database Systems”, Eighth
Edition, Pearson Education, 2006.
3. Atul Kahate, “Introduction to Database Management Systems”, Pearson Education, New
Delhi,2006.
4. Alexis Leon and Mathews Leon, “Database Management Systems”, Vikas Publishing House
Private Limited, New Delhi, 2003.
5. Raghu Ramakrishnan, “Database Management Systems”, Fourth Edition, Tata Mc Graw Hill,
2010.
6. G.K.Gupta, “Database Management Systems”, Tata Mc Graw Hill, 2011.
7. Rob Cornell, “Database Systems Design and Implementation”, Cengage Learning, 2011.
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
Multivalued attributes: Attributes with a set of value for a particular entity are called
multivalued attributes.
20. What are stored and derived attributes?
Stored attributes: The attributes stored in a data base are called stored attributes.
Derived attributes: The attributes that are derived from the stored attributes are
called derived attributes.
21. What are composite attributes?
Composite attributes can be divided in to sub parts.
22. 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.
23. Define the terms i) Entity type ii) Entity set
Entity type: An entity type defines a collection of entities that have the same attributes.
Entity set: The set of all entities of the same type is termed as an entity set.
24. What is meant by the degree of relationship set?
The degree of relationship type is the number of participating entity types.
25. 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.
26. Define weak and strong entity sets?
Weak entity set: entity set that do not have key attribute of their own are called weak
entity sets.
Strong entity set: Entity set that has a primary key is termed a strong entity set.
27. What does the cardinality ratio specify?
Mapping cardinalities or cardinality ratios express the number of entities to which
another entity can be associated. Mapping cardinalities must be one of the following:
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
transitive dependency if ther is a set of attributes Z that is not a subset of any key of R, and both
XY and ZY hold.
46. What is need for normalization.
To ensure that the update anomalies do not occur.
Normal forms provide a formal frame work for analyzing relation shemas based on
their keys and on the functional dependencies among their attributes.
A series of tests that can be carried out on individual relation schemas so that the
relation database can be normalized to any degree. When a test fails , the relation
violating that test must be decomposed into relations that individually meet the
normalization tests.
47. In what way BCNF is different from 3NF?
A relation schema R is in BCNF if whenever a functional dependency XY holds in
R,then X is a superkey of R.The only difference between BCNF and 3NF : the 3NF allows A to
be a prime if X is not a superkey, is absent from BCNF.
48. Define multivalued dependency.
Multivalued dependencies are a result of 1NF which disallowed an attribute in a tuple to
have a set of values. A multivalued dependency X->->Y specified on relation schema R where X
and Y are subsets of R specifies the following constraint on any relation r of R:
If two tuples t1 and t2 exist in r such that t1[x]=t2[x] then two tuples t3 and t4 should also
exist in r with the following properties:
t3[X]=t4[X]=t1[X]=t2[X]
t3[Y]=t1[Y]=t4[Y]=t2[Y]
t3[R-(XY)]=t2[R-(XY)]=t4[R-(XY)]=t1[R-(XY)]
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
Boyce-Codd Normal form: It is stricter than 3NF, meaning that every relation in BCNF is
also in 3NF; however a relation in 3NF is not necessarily in BCNF. A relation is in BCNF if and
only if every determinant is a candidate key (i.e) a relatioln schema R is in BCNF if whenever a
functional dependency X->A holds in R, then X is a superkey of R
51. Why are certain functional dependencies called trivial functional dependencies?
A multivaluedd functional dependency x->>Y in R is called a trivial MVD if
(a) Y is subset of X or
(b) XUY=R
e.g., the FD ename> pname is trivial
Ename Pname
52. Why are certain functional dependencies called non-trivial functional dependencies?
A multivalued functional dependency x> Y in R is called a no-trivial MVD if it does
not satisfy the following:
(a) Y is subset of X
(b) XUY=R
Ename Eno Dob Dno Dname dmgrno
Rename operation is used to rename both relations and a attributes.It uses the as clause,
taking the form:
Old-name as new-name
6. List the string operations supported by SQL?
1) Pattern matching Operation
2) Concatenation
3) Extracting character strings
4) Converting between uppercase and lower case letters.
7. List the set operations of SQL?
1) Union
2) Intersect operation
3) The except operation
8. What is the use of Union and intersection operation?
Union: The result of this operation includes all tuples that are either in r1 or in r2 or in
both r1 and r2.Duplicate tuples are automatically eliminated.
Intersection: The result of this relation includes all tuples that are in both r1 andr2.
9. What are aggregate functions? And list the aggregate functions supported by
SQL?
Aggregate functions are functions that take a collection of values as input and return a
single value.
Aggregate functions supported by SQL are
Average: avg
Minimum: min
Maximum: max
Total: sum
Count: count
10. What is the use of group by clause?
Group by clause is used to apply aggregate functions to a set of tuples. The attributes
given in the group by clause are used to form groups. Tuples with the same value on all
attributes in the group by clause are placed in one group.
11. What is the use of sub queries?
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
o Delete
o Select
o Insert
o Update
37. Mention the various user privileges.
All privileges directly granted to the user or role.
All privileges granted to roles that have been granted to the user or role.
38. Give the limitations of SQL authorization.
The code for checking authorization becomes intermixed with the rest of the
application code.
Implementing authorization through application code rather than specifying it
declaratively in SQL makes it hard to ensure the absence of loopholes.
39. List the disadvantages of relational database system
Repetition of data
Inability to represent certain information.
40. What do you mean by “Query Optimization”?
Improving of the strategy for processing a query is called “Query Optimization”. It is the
responsibility of the system to transform the query as entered by the user into an equivalent
query which can be computed more efficiently.
41. What is called query processing?
Query processing refers to the range of activities involved in extracting data froma
database.
42. What are the steps involved in query processing?
The basic steps are:
parsing and translation
optimization
Evaluation
43. What is called an evaluation primitive?
A relational algebra operation annotated with instructions on how to evaluate is called an
evaluation primitive.
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
Failed
Aborted
Committed
Terminated
7. What is a shadow copy scheme?
It is simple, but efficient, scheme called the shadow copy schemes. It is based on making
copies of the database called shadow copies that one transaction is active at a time. The scheme
also assumes that the database is simply a file on disk.
8. Give the reasons for allowing concurrency?
The reasons for allowing concurrency is if the transactions run serially, a short
transaction may have to wait for a preceding long transaction to complete, which can lead to
unpredictable delays in running a transaction. So concurrent execution reduces the unpredictable
delays in running transactions.
9. What is average response time?
The average response time is that the average time for a transaction to be completed after
it has been submitted.
10. What are the two types of serializability?
The two types of serializability is
Conflict serializability
View serializability
11. Define lock?
Lock is the most common used to implement the requirement is to allow a transaction to
access a data item only if it is currently holding a lock on that item.
12. What are the different modes of lock?
The modes of lock are:
Shared
Exclusive
13. Define deadlock?
Neither of the transaction can ever proceed with its normal execution. This situation is
called deadlock.
14. Define the phases of two phase locking protocol
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
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.
15. Define upgrade and downgrade?
It provides a mechanism for conversion from shared lock to exclusive lock is
known as upgrade.
It provides a mechanism for conversion from exclusive lock to shared lock is
known as downgrade.
16. What is a database graph?
The partial ordering implies that the set D may now be viewed as a directed acyclic
graph, called a database graph.
17. What are the two methods for dealing deadlock problem?
The two methods for dealing deadlock problem is deadlock detection and deadlock
recovery.
18. What is a recovery scheme?
An integral part of a database system is a recovery scheme that can restore the database to
the consistent state that existed before the failure.
19. What are the two types of errors?
The two types of errors are:
Logical error
System error
20. What is meant by log-based recovery?
The most widely used structures for recording database modifications is the log.The log
is a sequence of log records, recording all the update activities in the database. There are several
types of log records.
21. What are uncommitted modifications?
The immediate-modification technique allows database modifications to be output to the
database while the transaction is still in the active state. Data modifications written by active
transactions are called uncommitted modifications.
22. Define shadow paging.
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
Nonvolatile storage
2. Define blocks?
The database system resides permanently on nonvolatile storage, and is into fixed-length
storage units called blocks.
3. What is meant by Physical blocks?
The input and output operations are done in block units. The blocks residing on the disk
are referred to as physical blocks.
4. What is meant by buffer blocks?
The blocks residing temporarily in main memory are referred to as buffer blocks.
5. What is meant by disk buffer?
The area of memory where blocks reside temporarily is called the disk buffer.
6. Define garbage collection.
Garbage may be created also as a side effect of crashes. Periodically, it is necessary to
find all the garbage pages and to add them to the list of free pages. This process is called garbage
collection.
7. What is an index?
An index is a structure that helps to locate desired records of a relation quickly,without
examining all records.
8. Define query optimization.
Query optimization refers to the process of finding the lowest –cost method of evaluating
a given query.
9. What are the types of storage devices?
Primary storage
Secondary storage
Tertiary storage
Volatile storage
Nonvolatile storage
10. What is called remapping of bad sectors?
If the controller detects that a sector is damaged when the disk is initially formatted, or
when an attempt is made to write the sector, it can logically map the sector to a different physical
location.
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
30. What is the use of a slotted-page structure and what is the information present in the
header?
The slotted-page structure is used for organizing records within a single block.The header
contains the following information.
The number of record entries in the header.
The end of free space
An array whose entries contain the location and size of each record.
31. What are the two types of blocks in the fixed –length representation? Define them.
Anchor block: Contains the first record of a chain.
Overflow block: Contains the records other than those that are the first record of a chain.
32. What is known as heap file organization?
In the heap file organization, any record can be placed anywhere in the file where there is
space for the record. There is no ordering of records. There is a single file for each relation.
33. What is known as sequential file organization?
In the sequential file organization, the records are stored in sequential order,according to
the value of a “search key” of each record.
34. What is hashing file organization?
In the hashing file organization, a hash function is computed on some attribute of each
record. The result of the hash function specifies in which block of the file the record should be
placed.
35. What is known as clustering file organization?
In the clustering file organization, records of several different relations are stored in the
same file.
36. What are the types of indices?
Ordered indices
Hash indices
37. What are the techniques to be evaluated for both ordered indexing and hashing?
Access types
Access time
Insertion time
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
Deletion time
Space overhead
38. What is known as a search key?
An attribute or set of attributes used to look up records in a file is called a search key.
39. What is a primary index?
A primary index is an index whose search key also defines the sequential order of the
file.
40. What are called index-sequential files?
The files that are ordered sequentially with a primary index on the search key, are called
index-sequential files.
41. What are the two types of indices?
Dense index
Sparse index
42. What are called multilevel indices?
Indices with two or more levels are called multilevel indices.
43. What is B-Tree?
A B-tree eliminates the redundant storage of search-key values .It allows search key
values to appear only once.
44. What is a B+-Tree index?
A B+-Tree index takes the form of a balanced tree in which every path from the root of
the root of the root of the tree to a leaf of the tree is of the same length.
45. What is a hash index?
A hash index organizes the search keys, with their associated pointers, into a hash file
structure.
46. What are called as index scans?
Search algorithms that use an index are referred to as index scans.
47. What is called as external sorting?
Sorting of relations that do not fit into memory is called as external sorting.
48. What is called as recursive partitioning?
The system repeats the splitting of the input until each partition of the build input fits in
the memory. Such partitioning is called recursive partitioning.
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
It is a two-step process. In the first step, a model is built describing a pre-determined set
of data classes or concepts. The model is constructed by analyzing database tuples described by
attributes. In the second step the model is used for classification.
6. What is Association rule?
Association rule finds interesting association or correlation relationships among a large
set of data items, which is used for decision-making processes. Association rules analyzes
buying patterns that are frequently associated or purchased together.
7. How are association rules mined from large databases?
Association rule mining is a two-step process.
Find all frequent itemsets.
Generate strong association rules from the frequent itemsets.
8. Why do you need data warehouse life cycle process?
Data warehouse life cycle approach is essential because it ensures that the project pieces
are brought together in the right order and at the right time.
9. What are the merits of Data Warehouse?
Ability to make effective decisions from database
Better analysis of data and decision support
Discover trends and correlations that benefits business
Handle huge amount of data.
10. List some of the Data Warehouse tools?
OLAP (Online Analytic Processing)
ROLAP (Relational OLAP)
End User Data Access tool
Ad Hoc Query tool
Data Transformation services
Replication
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
16. Construct the ER diagram for 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.
UNIT II
1. Explain in detail about database Objects.
2. Write short note on the following:
[i]Data manipulation language
[ii]Data definition language
[iii] Data control language
3. Differentiate Static SQL and Dynamic SQL
4. Give the diagrammatic representation to indicate the basic steps in query processing.
5. How to choose the best evaluation plan for query?
6. How does pipelining improve query evaluation efficiency?
7. Explain in detail about Heuristics and Cost Estimates in Query Optimization.
8. Let relations r1[A,B,C] and r2[C,D,E] have the following properties:
r1 has 20,000 tuple, r2 has 45,000 tuples, 25 tuples of r1 fit on one block and 30 tuples of
r2 fit on the block. Estimate the number of block transfers and seeks required, using each
of the following join stratesies for r1 * r2 :
i. Nested loop join
ii. Block nested loop join
iii. Merge Join
9. Explain embedded SQL with suitable example.
10. Consider the employee database , where the primary keys are underlined.
employee(empname,street,city)
works(empname,companyname,salary)
company(companyname,city)
manages(empname,management)
Give an expression in the relational algebra for each request.
1) Find the names of all employees who work for First Bank Corporation.
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
2) Find the names, street addresses and cities of residence of all employees who work for
First Bank Corporation and earn more than 200000 per annum.
3) Find the names of all employees in this database who live in the same city as the
company for which they work.
4) Find the names of all employees who earn more than every employees of small Bank
Corporation.
UNIT III
1. Explain testing for Serializability with respect to concurrency control schemes. How will
you determine whether a schedule is serializable or not.
2. Explain the following protocols for concurrency control:
i. Lock-based protocols.
ii. Time stamp based protocols.
3. What is concurrency Control? How is it implemented in DBMS?
4. Explain the properties of transactions. Illustrate the states of transactions.
5. Briefly explain ACID property with an example.
6. When do you say that the system is in deadlock? Explain
7. Explain the two approaches of deadlock prevention.
8. Define a transaction. Then discuss the following with relevant examples:
(i) A read only transaction
(ii) A read write transaction
(iii) An aborted transaction
UNIT IV
1. Explain how the RAID system improves performance and reliability.
2. Describe the structure of B+ tree and list the characteristics of a B+ tree.
3. What are the different types of storage media?
4. Discuss briefly static and dynamic hashing.
Explain the use of index structure and explain the concept of ordered indices.
5. Describe a hash file organization.
6. Write a detailed note on hashing techniques.
WWW.VIDYARTHIPLUS.COM V +TEAM
WWW.VIDYARTHIPLUS.COM
7. Describe the different types of file organization? Explain using a sketch of each of them
with their advantages and disadvantages. Mention the purpose of indexing. How this can be
done by B+ tree? Explain.
8. Describe the different methods of implementing variable length record.
9. Explain in detail about Distributed Databases.
10. Explain in detail about Multidimensional and Parallel databases.
11. Describe in detail about spatial and multimedia databases.
UNIT V
1. Describe the classification of data? Explain about Threats and Risks?
2. Explain in detail about database control and types of privileges?
3. Explain in detail about Cryptography?
4. Describe about Statistical Databases and Distributed Databases?
5. Describe the architecture Data Warehousing and Mining?
6. Explain in detail about the transaction processing?
7. Describe about the Association rule?
8. Explain about Clustering, Information Retrieval, Relevance ranking?
9. Describe about the Crawling and Indexing the Web?
10. Explain about Object Oriented Databases and XML Databases with suitable example?
WWW.VIDYARTHIPLUS.COM V +TEAM