Anna University DATABASE MANAGEMENT SYSTEMS Two marks
UNIT V
PART A
1. Give the measures of quality of a disk.
Capacity
Access time
Seek time
Data transfer rate
Reliability
Rotational latency time.
2. Compare sequential access devices versus random access devices with an example
sequential access devices random access devices
Must be accessed from the beginning It is possible to read data from any location
Eg:-tape storage Eg:-disk storage
Access to data is much slower Access to data is faster
Cheaper than disk Expensive when compared with disk
3. What are the types of storage devices?
Primary storage
Secondary storage
Tertiary storage
4. Draw the storage device hierarchy according to their speed and their cost.
Cache
Main memory
Flash memory
Magnetic disk
Optical disk
Magnetic tapes
5. What are called jukebox systems?
Jukebox systems contain a few drives and numerous disks that can be loaded into
one of the drives automatically.
6. 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.
7. Define access time.
Access time is the time from when a read or write request is issued to when data
transfer begins.
8. Define seek time.
The time for repositioning the arm is called the seek time and it increases with the
distance that the arm is called the seek time.
9. Define average seek time.
The average seek time is the average of the seek times, measured over a sequence
of random requests.
10. Define rotational latency time.
The time spent waiting for the sector to be accessed to appear under the head is
called the rotational latency time.
11. Define average latency time.
The average latency time of the disk is one-half the time for a full rotation of the
disk.
12. What is meant by data-transfer rate?
The data-transfer rate is the rate at which data can be retrieved from or stored to
the disk.
13. What is meant by mean time to failure?
The mean time to failure is the amount of time that the system could run
continuously without failure.
14. What are a block and a block number?
A block is a contiguous sequence of sectors from a single track of one platter.
Each request specifies the address on the disk to be referenced. That address is in the
form of a block number.
15. What are called journaling file systems?
File systems that support log disks are called journaling file systems.
16. What is the use of RAID?
A variety of disk-organization techniques, collectively called redundant arrays of
independent disks are used to improve the performance and reliability.
17. Explain how reliability can be improved through redundancy?
The simplest approach to introducing redundancy is to duplicate every disk. This
technique is called mirroring or shadowing. A logical disk then consists of two physical
disks, and write is carried out on both the disk. If one of the disks fails the data can be
read from the other. Data will be lost if the second disk fails before the first fail ed disk is
repaired.
18. What is called mirroring?
The simplest approach to introducing redundancy is to duplicate every disk. This
technique is called mirroring or shadowing.
19. What is called mean time to repair?
The mean time to failure is the time it takes to replace a failed disk and to restore
the data on it.
20. What is called bit-level striping?
Data striping consists of splitting the bits of each byte across multiple disks. This
is called bit-level striping.
21. What is called block-level striping?
Block level striping stripes blocks across multiple disks. It treats the array of disks
as a large disk, and gives blocks logical numbers.
22. What are the two main goals of parallelism?
Load –balance multiple small accesses, so that the throughput of such
accesses increases.
Parallelize large accesses so that the response time of large accesses is
reduced
23. What are the factors to be taken into account when choosing a RAID level?
Monetary cost of extra disk storage requirements.
Performance requirements in terms of number of I/O operations
Performance when a disk has failed.
Performances during rebuild.
24. What is meant by software and hardware RAID systems?
RAID can be implemented with no change at the hardware level, using only
software modification. Such RAID implementations are called software RAID systems
and the systems with special hardware support are called hardware RAID systems.
25. Define hot swapping?
Hot swapping permits the removal of faulty disks and replaces it by new ones
without turning power off. Hot swapping reduces the mean time to repair.
26. Which level of RAID is best? Why?
RAID level 1 is the RAID level of choice for many applications with moderate
storage requirements and high I/O requirements. RAID 1 follows mirroring and provides
best write performance.
27. 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.
28. What are the ways in which the variable-length records arise in database
systems?
Storage of multiple record types in a file.
Record types that allow variable lengths for one or more fields.
Record types that allow repeating fields.
29. Explain the use of variable length records.
They are used for Storing of multiple record types in a file.
Used for storing records that has varying lengths for one or more fields.
Used for storing records that allow repeating fields
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 is an index?
An index is a structure that helps to locate desired records of a relation quickly,
without examining all records.
37. What are the two types of ordered indices?
. Primary index
. Secondary index
38. What are the types of indices?
.Ordered indices
.Hash indices
39. What are the techniques to be evaluated for both ordered indexing and hashing?
.Access types
.Access time
.Insertion time
.Deletion time
.Space overhead
40. 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.
41. What is a primary index?
A primary index is an index whose search key also defines the sequential order of
the file.
42. 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.
43. What are the two types of indices?
.Dense index
.Sparse index
44. What are called multilevel indices?
Indices with two or more levels are called multilevel indices.
45. What are called secondary indices?
Indices whose search key specifies an order different from sequential order of the
file are called secondary indices. The pointers in secondary index do not point directly to
the file. Instead each points to a bucket that contains pointers to the file.
46. What are the disadvantages of index sequential files?
The main disadvantage of the index sequential file organization is that
performance degrades as the file grows. This degradation is remedied by reorganization
of the file.
47. 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.
P1 K1 P2 K2 …………. Pn-1 Kn-1 Pn
A node contains up to n-1 search key values and n pointers.
48. What is B-Tree?
A B-tree eliminates the redundant storage of search-key values .It allows search
key values to appear only once.
49. What is hashing?
Hashing allows us to find the address of a data item directly by computing a hash
function on the search key value of the desired record.
50. How do you create index in SQL?
We create index by he create index command.
Create index<index name>on <relation name> (<attribute list>)
51. Distinguish between static hashing and dynamic hashing?
Static hashing
Static hashing uses a hash function in which the set of bucket adders is
fixed. Such hash functions cannot easily accommodate databases that
grow larger over time.
Dynamic hashing
Dynamic hashing allows us to modify the hash function dynamically.
Dynamic hashing copes with changes in database size by splitting and
coalescing buckets as the database grows and shrinks.
52. What is a hash index?
A hash index organizes the search keys, with their associated pointers, into a hash
file structure.
53. 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
54. Differentiate open hashing and closed hashing (overflow chaining)
Closed hashing (overflow chaining)
If a record must be inserted in to a bucket b, and b is already full, the system
provides an overflow bucket for b, and inserts the record in to the overflow bucket. If the
overflow bucket is also full, the system provides another overflow bucket, and so on. All
the overflow buckets of a given buckets are chained together in a linked list, overflow
handling using linked list is known as closed hashing.
Open hashing
The set of buckets is fixed, and there are no overflow chains. Instead, if a bucket
is full, the system inserts records in some other bucket in the initial set of buckets.
55. What is linear probing?
Linear probing is a type of open hashing. If a bucket is full the system inserts
records in to the next bucket that has space. This is known as linear probing.
56. What is called query processing?
Query processing refers to the range of activities involved in extracting data from
a database.
57. What are the steps involved in query processing?
The basic steps are:
.parsing and translation
.optimization
.evaluation
58. What is called an evaluation primitive?
A relational algebra operation annotated with instructions on how to evaluate is
called an evaluation primitive.
59. What is called a query evaluation plan?
A sequence of primitive operations that can be used to evaluate ba query is a
query evaluation plan or a query execution plan.
60. What is called a query –execution engine?
The query execution engine takes a query evaluation plan, executes that plan, and
returns the answers to the query.
61. How do you measure the cost of query evaluation?
The cost of a query evaluation is measured in terms of a number of different
resources including disk accesses, CPU time to execute a query, and in a distributed
database system the cost of communication
62. List out the operations involved in query processing
Selection operation
Join operations.
Sorting.
Projection
Set operations
Aggregation
3. Explain indexing and hashing
4. Explain B+ tree index in detail
5. Explain Query processing in detail.
6. Explain Ordered indices in detail.
7. Explain Static hashing.
8. Explain Dynamic hashing.
9. Explain organization of records in files.
10. Explain JOIN, SELECTION and SORTING
11.Explain Tertiary storage.
12.Explain the cost estimation
13.What is Query optimization ?What are different techniques used in it.
14.Discuss in detail the physical storage media
15.Explain the magnetic disks
16.Discuss Database tuning
UNIT V
PART A
1. Give the measures of quality of a disk.
Capacity
Access time
Seek time
Data transfer rate
Reliability
Rotational latency time.
2. Compare sequential access devices versus random access devices with an example
sequential access devices random access devices
Must be accessed from the beginning It is possible to read data from any location
Eg:-tape storage Eg:-disk storage
Access to data is much slower Access to data is faster
Cheaper than disk Expensive when compared with disk
3. What are the types of storage devices?
Primary storage
Secondary storage
Tertiary storage
4. Draw the storage device hierarchy according to their speed and their cost.
Cache
Main memory
Flash memory
Magnetic disk
Optical disk
Magnetic tapes
5. What are called jukebox systems?
Jukebox systems contain a few drives and numerous disks that can be loaded into
one of the drives automatically.
6. 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.
7. Define access time.
Access time is the time from when a read or write request is issued to when data
transfer begins.
8. Define seek time.
The time for repositioning the arm is called the seek time and it increases with the
distance that the arm is called the seek time.
9. Define average seek time.
The average seek time is the average of the seek times, measured over a sequence
of random requests.
10. Define rotational latency time.
The time spent waiting for the sector to be accessed to appear under the head is
called the rotational latency time.
11. Define average latency time.
The average latency time of the disk is one-half the time for a full rotation of the
disk.
12. What is meant by data-transfer rate?
The data-transfer rate is the rate at which data can be retrieved from or stored to
the disk.
13. What is meant by mean time to failure?
The mean time to failure is the amount of time that the system could run
continuously without failure.
14. What are a block and a block number?
A block is a contiguous sequence of sectors from a single track of one platter.
Each request specifies the address on the disk to be referenced. That address is in the
form of a block number.
15. What are called journaling file systems?
File systems that support log disks are called journaling file systems.
16. What is the use of RAID?
A variety of disk-organization techniques, collectively called redundant arrays of
independent disks are used to improve the performance and reliability.
17. Explain how reliability can be improved through redundancy?
The simplest approach to introducing redundancy is to duplicate every disk. This
technique is called mirroring or shadowing. A logical disk then consists of two physical
disks, and write is carried out on both the disk. If one of the disks fails the data can be
read from the other. Data will be lost if the second disk fails before the first fail ed disk is
repaired.
18. What is called mirroring?
The simplest approach to introducing redundancy is to duplicate every disk. This
technique is called mirroring or shadowing.
19. What is called mean time to repair?
The mean time to failure is the time it takes to replace a failed disk and to restore
the data on it.
20. What is called bit-level striping?
Data striping consists of splitting the bits of each byte across multiple disks. This
is called bit-level striping.
21. What is called block-level striping?
Block level striping stripes blocks across multiple disks. It treats the array of disks
as a large disk, and gives blocks logical numbers.
22. What are the two main goals of parallelism?
Load –balance multiple small accesses, so that the throughput of such
accesses increases.
Parallelize large accesses so that the response time of large accesses is
reduced
23. What are the factors to be taken into account when choosing a RAID level?
Monetary cost of extra disk storage requirements.
Performance requirements in terms of number of I/O operations
Performance when a disk has failed.
Performances during rebuild.
24. What is meant by software and hardware RAID systems?
RAID can be implemented with no change at the hardware level, using only
software modification. Such RAID implementations are called software RAID systems
and the systems with special hardware support are called hardware RAID systems.
25. Define hot swapping?
Hot swapping permits the removal of faulty disks and replaces it by new ones
without turning power off. Hot swapping reduces the mean time to repair.
26. Which level of RAID is best? Why?
RAID level 1 is the RAID level of choice for many applications with moderate
storage requirements and high I/O requirements. RAID 1 follows mirroring and provides
best write performance.
27. 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.
28. What are the ways in which the variable-length records arise in database
systems?
Storage of multiple record types in a file.
Record types that allow variable lengths for one or more fields.
Record types that allow repeating fields.
29. Explain the use of variable length records.
They are used for Storing of multiple record types in a file.
Used for storing records that has varying lengths for one or more fields.
Used for storing records that allow repeating fields
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 is an index?
An index is a structure that helps to locate desired records of a relation quickly,
without examining all records.
37. What are the two types of ordered indices?
. Primary index
. Secondary index
38. What are the types of indices?
.Ordered indices
.Hash indices
39. What are the techniques to be evaluated for both ordered indexing and hashing?
.Access types
.Access time
.Insertion time
.Deletion time
.Space overhead
40. 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.
41. What is a primary index?
A primary index is an index whose search key also defines the sequential order of
the file.
42. 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.
43. What are the two types of indices?
.Dense index
.Sparse index
44. What are called multilevel indices?
Indices with two or more levels are called multilevel indices.
45. What are called secondary indices?
Indices whose search key specifies an order different from sequential order of the
file are called secondary indices. The pointers in secondary index do not point directly to
the file. Instead each points to a bucket that contains pointers to the file.
46. What are the disadvantages of index sequential files?
The main disadvantage of the index sequential file organization is that
performance degrades as the file grows. This degradation is remedied by reorganization
of the file.
47. 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.
P1 K1 P2 K2 …………. Pn-1 Kn-1 Pn
A node contains up to n-1 search key values and n pointers.
48. What is B-Tree?
A B-tree eliminates the redundant storage of search-key values .It allows search
key values to appear only once.
49. What is hashing?
Hashing allows us to find the address of a data item directly by computing a hash
function on the search key value of the desired record.
50. How do you create index in SQL?
We create index by he create index command.
Create index<index name>on <relation name> (<attribute list>)
51. Distinguish between static hashing and dynamic hashing?
Static hashing
Static hashing uses a hash function in which the set of bucket adders is
fixed. Such hash functions cannot easily accommodate databases that
grow larger over time.
Dynamic hashing
Dynamic hashing allows us to modify the hash function dynamically.
Dynamic hashing copes with changes in database size by splitting and
coalescing buckets as the database grows and shrinks.
52. What is a hash index?
A hash index organizes the search keys, with their associated pointers, into a hash
file structure.
53. 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
54. Differentiate open hashing and closed hashing (overflow chaining)
Closed hashing (overflow chaining)
If a record must be inserted in to a bucket b, and b is already full, the system
provides an overflow bucket for b, and inserts the record in to the overflow bucket. If the
overflow bucket is also full, the system provides another overflow bucket, and so on. All
the overflow buckets of a given buckets are chained together in a linked list, overflow
handling using linked list is known as closed hashing.
Open hashing
The set of buckets is fixed, and there are no overflow chains. Instead, if a bucket
is full, the system inserts records in some other bucket in the initial set of buckets.
55. What is linear probing?
Linear probing is a type of open hashing. If a bucket is full the system inserts
records in to the next bucket that has space. This is known as linear probing.
56. What is called query processing?
Query processing refers to the range of activities involved in extracting data from
a database.
57. What are the steps involved in query processing?
The basic steps are:
.parsing and translation
.optimization
.evaluation
58. What is called an evaluation primitive?
A relational algebra operation annotated with instructions on how to evaluate is
called an evaluation primitive.
59. What is called a query evaluation plan?
A sequence of primitive operations that can be used to evaluate ba query is a
query evaluation plan or a query execution plan.
60. What is called a query –execution engine?
The query execution engine takes a query evaluation plan, executes that plan, and
returns the answers to the query.
61. How do you measure the cost of query evaluation?
The cost of a query evaluation is measured in terms of a number of different
resources including disk accesses, CPU time to execute a query, and in a distributed
database system the cost of communication
62. List out the operations involved in query processing
Selection operation
Join operations.
Sorting.
Projection
Set operations
Aggregation
PART B
1. Explain RAID levels in detail
2. Explain file organization in details.3. Explain indexing and hashing
4. Explain B+ tree index in detail
5. Explain Query processing in detail.
6. Explain Ordered indices in detail.
7. Explain Static hashing.
8. Explain Dynamic hashing.
9. Explain organization of records in files.
10. Explain JOIN, SELECTION and SORTING
11.Explain Tertiary storage.
12.Explain the cost estimation
13.What is Query optimization ?What are different techniques used in it.
14.Discuss in detail the physical storage media
15.Explain the magnetic disks
16.Discuss Database tuning
0 comments:
Post a Comment