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
63. What are called as index scans?
Search algorithms that use an index are referred to as index scans.
64. What is called as external sorting?
Sorting of relations that do not fit into memory is called as external sorting.
65. Explain nested loop join?
Nested loop join consists of a pair of nested for loops. Example: r|. | s r is the outer relation and s is the inner relation.
66. What is meant by block nested loop join?
Block nested loop join is the variant of the nested loop join where every block of the inner relation is paired with every block of the outer relation. With in each pair of blocks every tuple in one block is paired with every tuple in the other blocks to generate all pairs of tuples.
67. What is meant by hash join?
In the hash join algorithm a hash function h is used to implement partition tuples of both relations.
68. 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.
69. What is called as an N-way merge?
The merge operation is a generalization of the two-way merge used by the standard in-memory sort-merge algorithm. It merges N runs, so it is called an N-way merge.
70. What is known as fudge factor?
The number of partitions is increased by a small value called the fudge factor, which is usually 20 percent of the number of hash partitions computed.
71. Define query optimization.
Query optimization refers to the process of finding the lowest –cost method of evaluating a given query.
No comments:
Post a Comment