DBMS 2marks
DBMS 2marks
TWO MARKS
UNIT: 1
INTRODUCTION
1. What are the functions of a DBA? [April/May 2010]
Write down any two major responsibilities of a database administrator.[Nov/Dec
2010]
Who is a DBA? What are the responsibilities of a DBA? [April/May 2011]
A database administrator (short form DBA) is a person responsible for the design,
implementation, maintenance and repair of an organization's database.
The responsibilities of DBA are:
Schema definition
Routine maintenance
2. Differentiate File systems and Database management system.[May/June 2010]
List four significant differences between file processing system and DBMS.[May/June
2012]
File processing systems Database management system
5. What is a data model? List the types of data models used. [April/May 2011]
What is a data model? [Nov/Dec 2011]
Hierarchical model
Network model
Relational model
Entity-relationship
Object-relational model
Object model
A database is an integrated collection of data records, files, and other database objects.
A DBMS allows different user application programs to concurrently access the same
database. DBMSs may use a variety of database models, such as the relational model
or object model, to conveniently describe and support applications.
Database languages also simplify the database organization as well as retrieving and
presenting information from it.
A DBMS provides facilities for controlling data access, enforcing data integrity,
managing concurrency control, recovering the database after failures and restoring it
from backup files, as well as maintaining database security.
UNIT-II
RELATIONAL MODEL
1. Explain the basic structure of a relational database with an example.[April / May2010]
2. Give the usage of the rename operation with an example.[April / May2010]
3. Write the Tuple relational calculus expression to find the number of employees working in
Sales department in the given relation Employee. [May/June 2010]
Employee (SSN-No, Name, Department)
Unary operators
Select
Project
Rename
Binary operators
Set union
Cartesian product
Set difference
6. What are the four broad categories of constraints? [Nov/Dec 2010]
7. What is embedded SQL? What are its advantages?[April/May 2011]
8. What is the difference between tuple relational calculus and domain relational calculus?
[April/May 2011]
9. Consider the following relation : [Nov/Dec 2011]
EMP (ENO, NAME, DATE_OF_BIRTH, SEX, DATE_OF_JOINING, BASIC_PAY, DEPT)
Develop an SQL query that will find and display the average BASIC_PAY in each DEPT.
10. List the two types of embedded SQL SELECT statements. [Nov/Dec 2011]
28. 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
UNIT-III
DATABASE DESIGN
1. What is meant by lossless-join decomposition? APRIL/MAY-2011
We claim the above decomposition is lossless. How can we decide whether
decomposition is lossless?
1. Let R be a relation schema.
2. Let F be a set of functional dependencies on R.
b.
30. List some security violations (or) name any forms of malicious access.
Unauthorized reading of data
Unauthorized modification of data
Unauthorized destruction of data.
33. List out various user authorization to modify the database schema.
Index authorization
Resource authorization
Alteration authorization
Drop authorization
UNIT IV
TRANSACTIONS:
1. What are the ACID properties? APRIL/MAY-2011
(atomicity, consistency, isolation, durability) is a set of properties that guarantee
database transactions are processed reliably. In the context of databases, a single logical
operation on the data is called a transaction. For example, a transfer of funds from one bank
account to another, even though that might involve multiple changes (such as debiting one
account and crediting another), is a single transaction
Deadlock
Starvation
3. What is transaction?
Collections of operations that form a single logical unit of work are called
transactions.
20. What are the two methods for dealing deadlock problem?
The two methods for dealing deadlock problem is deadlock detection and
deadlock recovery.
37. What are the time stamps 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.
UNIT V
IMPLEMENTATION TECHNIQUES:
1.What are the advantages and disadvantages of indexed sequential file? APRIL/MAY-
2011
The advantage of ordering records in a sequential file according to a key is that you
can then search the file more quickly. If you know the key value that you want, you can use
one of the relatively fast searches. The disadvantage is that when you insert, you need to
rewrite at least everything after the insertion point, which makes inserts very expensive
unless they are done at the end of the file. An indexed file approach keeps a (hopefully) small
part of each row, and some kind of "pointer" to the row's location within the data file. This
allows a search to use the index, which is ordered by the index and (again hopefully) much
smaller and therefore much faster than scanning the entire data file for the indexed data.
6. Draw the storage device hierarchy according to their speed and their cost.
Cache
Main memory
Flash memory
Magnetic disk
Optical disk
Magnetic tapes
29. Distinguish between fixed length records and variable length records?
Fixed length records
Every record has the same fields and field lengths are fixed.
Variable length records
File records are of same type but one or more of the fields are of varying size.
30. What are the ways in which the variable-length records arise in database systems?
Storage o f multiple record types in a file.
Record types that allow variable lengths for one or more fields.
Record types that allow repeating fields.
32. 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.
33. 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 o f a chain.
41. What are the techniques to be evaluated for both ordered indexing and hashing?
Access types
Access time
Insertion time
Deletion time
Space overhead
55. What can be done to reduce the occurrences of bucket overflows in a hash file
organization?
To reduce bucket overflow the number of bucket is chosen to be
(nr/fr)*(1+d).
We handle bucket overflow by using
• Overflow chaining(closed hashing)
• Open hashing
56. Differentiate open hashing and closed hashing (overflow chaining)
Closed hashing (overflow chaining)
UNIT II
RELATIONAL MODEL:
1. a) What is data integrity? Explain the types of integrity constraints. April/May-
2011
b) what are the relational algebra operations supported in SQL? April/May-2011
1. a) what is meant by Selection and projection used in Relational algebra? (8)
b) How we made lossless and loss-join in relational model? (8)
2. a) Define class Hierarchies and Aggregation? (8)
3. a)Explain the strength and weakness of the Triggers mechanism (8)
and update views in stored procedure.
b)What is meant by Integrity and security? (8)
4. Consider the following relational schema
Employee (empno,name,office,age)
Books(isbn,title,authors,publisher)
Loan(empno, isbn,date)
5. Write the following queries in relational algebra.
6. a. Find the names of employees who have borrowed a book
Published by McGraw-Hill. (4)
b. Find the names of employees who have borrowed all books
Published by McGraw-Hill. (4)
c. Find the names of employees who have borrowed more than
five different books published by McGraw-Hill. (4)
d. For each publisher, find the names of employees who have borrowed
More than five books of that publisher. (4)
7. Explain the details about embedded and dynamic SQL (16)
8. Draw a neat sketch to indicate the architecture of a distributed database system.
With
an example explain the various form of data fragmentation used in DDB.
UNIT III
DATABASE DESIGN:
1. A) Explain 1NF, 2Nf and BCNF with suitable example. April/May-2011
2. What are the pitfalls in relational database design? With a suitable example,
explain the role of functional dependency in the
process of normalization. April/May-2011
UNIT V
IMPLEMENTATION TECHNIQUES:
1. A) List the different levels in RAID technology and explain its features.
April/May-2011
b) Describe the different method of implementing variable length records.
April/May-2011
3. a) What is Raid? List the different levels in Raid technology and explain
its features (8)
b) Discuss about primary file storage system (8)
4. Explain static and dynamic Hashing Techniques? (16)
5. Briefly describe about B+ tree index file structure. (16)
6. What are the steps involved in Query processing? How would you (16)
estimate the cost of query.
7. Discuss selection operation techniques (16)
8. Explain structure of file indices (16)
9. Explain different properties of indexes in detail (16)
10. With a neat diagram explain the steps involved in query process.
11. Explain in detail about B+ tree index files.
12. What is deadlock? Explain the various approaches used to recover from deadlock.