Thursday, April 17, 2014

DBMS

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. 

Draw the structure of a B+ tree and explain briefly. 


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>) 

No comments:

Post a Comment