This is type of indexing which is based on sorted ordering values. Various ordered indices are primary indexing, secondary indexing.
Two Marks Questions with Answers
Q.1 What is the need for RAID? AU: May-13
Ans.: Refer
section 4.1
• RAID is a technology that is used to increase the performance.
• It is used for increased reliability of data storage.
• An array of multiple disks accessed in parallel will give greater throughput than a single disk.
• With multiple disks and a suitable redundancy scheme, your system can stay up and running when a disk fails, and even while the replacement disk is being installed and its data restored.
Q.2 Define Software and hardware RAID systems. AU: May-16
Ans.: Hardware
RAID: The hardware-based array manages the RAID subsystem independently from
the host. It presents a single disk per RAID array to the host. Software RAID:
Software RAID implements the various RAID levels in the kernel disk code. It
offers the cheapest possible solution, as expensive disk controller cards.
Q.3 What are ordered indices? AU: June-09, Dec. -11,17, May-14
Ans.: This is type
of indexing which is based on sorted ordering values. Various ordered indices
are primary indexing, secondary indexing.
Q.4 What are the two types of ordered indices? AU: Dec.-06
Ans.: Two types of
ordered indices are - Primary indexing and secondary indexing. The primary
indexing can be further classified into dense indexing and sparse indexing and
single level indexing and multilevel indexing.
Q.5 Give the comparison between ordered indices and
hashing. AU: Dec-06
Ans.:
(1) If range of queries are common, ordered indices are to be used.
(2) The buckets containing records can be chained in sorted
order in case of ordered indices.
(3) Hashing is generally better at retrieving records having
a specified value of the key.
(4) Hash function assigns values randomly to buckets. Thus, there is no
simple notion of "next bucket in sorted order."
Q.6 What are the causes of bucket overflow in a
hash file organization?
Ans.:Bucket overflow can occur for following
reasons -
(1) Insufficient buckets: For the total number of
buckets there are insufficient number of buckets to occupy.
(2) Skew: Some buckets are assigned more records than are others, so a bucket might overflow even while other buckets still have space. This situation is known as bucket skew.
Q.7 What can be done to reduce the occurrences of
bucket overflows in a hash file organization?
AU: May-07, June-09, Dec.-12
Ans.:
(1) A bucket is a unit of storage containing one or more records (a
bucket is typically a disk block).
(2) The file blocks are divided into M equal-sized buckets, numbered
bucket0, bucket... bucketM-1. Typically, a bucket corresponds to one (or a
fixed number of) disk block.
(3) In a hash file organization we obtain the bucket of a
record directly from its search- key value using a hash function, h (K).
(4) To reduce overflow records, a hash file is typically kept 70-80%
full.
(5) The hash function h should distribute the records uniformly among the buckets; otherwise, search time will be increased because many overflow records will exist.
Q.8 Distinguish between dense and
sparse indices. AU:
May-08, June-09
Ans.:Refer section 4.7.
1) Dense index:
• An index record appears for every search key value in file.
• This record contains search key value and a pointer to the actual record.
2) Sparse index:
• Index records are created only for some of the records.
• To locate a record, we find the index record with the largest search key value less than or equal to the search key value we are looking for.
• We start at that record pointed to by the index record, and proceed along the pointers in the file (that is, sequentially) until we find the desired record
Q.9 When is it preferable to use a dense index
rather than a sparse index? Explain your answer. AU: Dec. -11
Ans.:
1. It is preferable to use a dense index instead of a sparse index when the
file is not sorted on the indexed field.
2. Or when the index file is small compared to the size of memory.
Q.10 How does B-tree differs from a B+ tree? Why is
a B+ tree usually preferred as an access structure to a data file? AU: Dec.-08
Ans.:
Refer section 4.9.
Q.11 What are the disadvantages of B tree over B+
tree? AU: Dec.-16
Ans.:
(1) Searching of a key value becomes difficult in B-tree as data can not
be found in the leaf
node.
(2) The leaf node can not store linked list and thus wastes the space.
Q.12 Mention different hashing
techniques. AU:
May-12
Ans.: Two types of hashing techniques are - i) Static hashing ii) Dynamic hashing.
Q.13 List the mechanisms to avoid collision
during hashing. AU: Dec.-16
Ans.:
Collision Resolution techniques are: (1) Separate chaining
(2) Open addressing techniques: (i) Linear probing (ii)
Quadratic probing
Q.14 What is the basic difference between static
hashing and dynamic hashing? AU: May-13,
Dec.-14,15
Ans.:
Refer section 4.12.
Q.15 What is the need for query optimization? AU:
May-15
Ans.: Query optimization is required for fast execution of long
running complex
Q.16 Which cost component are used most commonly as
the basis for cost function. AU: May-17,
Dec.-19
Ans.:
Disk access or secondary storage access is considered most commonly as a basis
for cost function.
Q.17 What is query execution plan? AU: May-17
Ans.:
To specify fully how to evaluate a query, we need not only to provide the
relational-algebra expression, but also to annotate it with instructions
specifying how to evaluate each operation. This annotated structure is called
query execution plan.
Q.18 Mention all the operations of
files.
Ans. Various file operations are - (1)
Creation of file (2) Insertion of data (3) Deletion of data (4) Searching
desired data from the file. ba
Q.19 Define dense index. AU: May-19
Ans.:Refer
section 4.7.
• An index record appears for every search key value in file.
• This record contains search key value and a pointer to the actual record.
• For example:
Database Management System: Unit IV: Implementation Techniques : Tag: : Implementation Techniques - Database Management System - Two marks Questions with Answers
Database Management System
CS3492 4th Semester CSE Dept | 2021 Regulation | 4th Semester CSE Dept 2021 Regulation