Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following operations is used for the union of bitmaps?(a) Logical AND(b) Logical OR(c) Logical NOT(d) Logical NORI got this question in a national level competition.My query is from Bitmap Indices topic in portion Indexing and Hashing of RDBMS

Answer»

Correct option is (B) Logical OR

Easiest explanation: The logical OR operation is used for the COMPUTATION of the UNION of bitmaps. This is similar to the BINARY set union operation.

2.

State true or false: Intersection operations are extremely slow on bitmaps(a) True(b) FalseI have been asked this question at a job interview.This interesting question is from Bitmap Indices topic in portion Indexing and Hashing of RDBMS

Answer»

Right answer is (b) False

To ELABORATE: Intersection operations are extremely fast on bitmaps making them ideal for SUPPORTING queries on MULTIPLE attributes.

3.

We delete and index in SQL using the ________ command(a) Remove index(b) Delete index(c) Drop index(d) None of the mentionedThe question was posed to me in class test.The above asked question is from Bitmap Indices in division Indexing and Hashing of RDBMS

Answer» RIGHT choice is (c) DROP index

The BEST I can explain: We delete and index in SQL using the drop index command. Syntax: drop index ;
4.

We create an index in SQL using _______ command(a) Create index(b) New index(c) Create new index(d) Develop indexI have been asked this question in exam.The query is from Bitmap Indices topic in portion Indexing and Hashing of RDBMS

Answer» RIGHT choice is (a) Create index

For EXPLANATION: We create an index in SQL USING the create index command. Eg: create index dept_index on instructor(dept_name).
5.

State true or false: Bitmaps can be combined with B+ trees(a) True(b) FalseThis question was addressed to me in quiz.The question is from Bitmap Indices topic in portion Indexing and Hashing of RDBMS

Answer» CORRECT option is (a) True

For explanation I would say: Bitmaps can be combined with B+ trees for RELATIONS where a few ATTRIBUTE values are extremely common.
6.

The complement operation in bitmaps is done by using(a) Logical AND(b) Logical OR(c) Logical NOT(d) Logical NORI have been asked this question in class test.Question is taken from Bitmap Indices topic in portion Indexing and Hashing of RDBMS

Answer» RIGHT answer is (C) Logical NOT

The explanation: The complement operation in bitmaps is DONE by using the logical not operator. This is similar to the BINARY complement operation.
7.

What does an existence bitmap do?(a) It recognizes deleted records(b) It inserts values into empty bitmaps(c) It makes sure that no records are deleted(d) None of the mentionedI have been asked this question in an online quiz.I'm obligated to ask this question of Bitmap Indices in portion Indexing and Hashing of RDBMS

Answer»

Right CHOICE is (a) It RECOGNIZES deleted RECORDS

Easy explanation: An existence BITMAP is used to recognize deleted records and not to prevent deletion of records. It ALSO does not insert any records into empty bitmaps.

8.

Intersection of the bitmaps is done by(a) Logical AND(b) Logical OR(c) Logical NOT(d) Logical NORI got this question by my college professor while I was bunking the class.The query is from Bitmap Indices topic in chapter Indexing and Hashing of RDBMS

Answer»

Correct ANSWER is (a) LOGICAL AND

The explanation: The intersection of the bitmaps is DONE by the logical AND operation. This is similar to the binary SET intersection operation which is done by the logical AND operation.

9.

A _________ on the attribute A of relation r consists of one bitmap for each value that A can take(a) Bitmap array(b) Bitmap index(c) Bitmap excess(d) BitmapI got this question in an international level competition.The query is from Bitmap Indices topic in portion Indexing and Hashing of RDBMS

Answer»

Right OPTION is (b) Bitmap index

For explanation: A bitmap index on the attribute A of RELATION r CONSISTS of one bitmap for each value that A can take. Each bitmap CONTAINS as many bits as the number of records in the relation.

10.

A bitmap is_______(a) An array of bits(b) An index of bits(c) A function mapping all the bits of data(d) None of the mentionedI got this question in an online interview.My doubt is from Bitmap Indices topic in section Indexing and Hashing of RDBMS

Answer»

The correct answer is (a) An ARRAY of BITS

Easiest explanation: A bitmap is simply an array of bits. A bitmap can be used for various purposes such as bitmap INDEXING.

11.

Which of the following hash function classifies data into the highest number of buckets ?(a) Sum of digits modulo 8(b) Sum of digits modulo 5(c) Sum of digits modulo 2(d) Sum of digitsThis question was addressed to me in final exam.This key question is from Dynamic Hashing topic in portion Indexing and Hashing of RDBMS

Answer»

Correct choice is (d) SUM of DIGITS

To explain I would say: The sum of the digits hash function CLASSIFIES the data into 10 DIFFERENT buckets thus MAKING it the highest.

12.

Which of the following hash function classifies data into least number of buckets?(a) Sum of digits modulo 8(b) Sum of digits modulo 5(c) Sum of digits modulo 2(d) Sum of digitsI have been asked this question in semester exam.This key question is from Dynamic Hashing topic in section Indexing and Hashing of RDBMS

Answer»

The CORRECT CHOICE is (a) SUM of digits modulo 8

For explanation I would SAY: The sum of digits modulo 2 CLASSIFIES the data into only 2 buckets i.e. 0 and 1.

13.

Which of the following is an issue that needs to be considered while choosing an indexing technique?(a) Frequency of insertion and deletion(b) Data types of the data(c) Number of items in the relation(d) None of the mentionedThe question was posed to me at a job interview.This interesting question is from Dynamic Hashing topic in section Indexing and Hashing of RDBMS

Answer»

The correct ANSWER is (a) Frequency of INSERTION and deletion

For explanation I would SAY: The frequency of insertion and deletion has to be taken into consideration while CHOOSING an indexing technique. The frequency of insertion and deletion DETERMINES the hash index.

14.

Hash structures are not the best choice for which of the following?(a) A search key on which individual point queries are likely(b) A search key which is invalid(c) A search key on which range queries are likely(d) A search key on which multi-level queries are likelyThe question was asked by my college professor while I was bunking the class.Asked question is from Dynamic Hashing topic in portion Indexing and Hashing of RDBMS

Answer»

Correct CHOICE is (c) A search KEY on which range queries are likely

For explanation I would say: Hash structures are not the best choice for search KEYS on which range queries are likely because the range queries might contain DIFFERENT values of the search keys which might RESULT in improper placement in the hash table.

15.

The form of dynamic hashing that avoids the additional level of indirection is called as_________(a) Linear hashing(b) Static hashing(c) Directive hashing(d) Indirective hashingThis question was addressed to me by my school principal while I was bunking the class.Question is from Dynamic Hashing in section Indexing and Hashing of RDBMS

Answer»

The CORRECT ANSWER is (a) Linear HASHING

The best explanation: The form of dynamic hashing that avoids the additional LEVEL of indirection is called as Linear hashing. This has more overflow BUCKETS than extendable hashing.

16.

Which of the following is a disadvantage of the dynamic hashing structure(a) Buckets can be allocated dynamically(b) Lookup involves additional level of indirection(c) It involves a lesser space overhead(d) Hash structure can be modified dynamicallyI got this question in exam.The doubt is from Dynamic Hashing topic in section Indexing and Hashing of RDBMS

Answer»

The correct ANSWER is (b) Lookup involves additional LEVEL of INDIRECTION

The explanation: In DYNAMIC HASHING, lookup involves an additional level of indirection. The rest of the options are the advantages of dynamic hashing.

17.

The space overhead in dynamic hashing is ________ than that of static hashing(a) More(b) Less(c) Equal(d) None of the mentionedI have been asked this question in homework.My query is from Dynamic Hashing topic in chapter Indexing and Hashing of RDBMS

Answer»

Correct ANSWER is (b) Less

To explain: The space overhead in dynamic HASHING is less than that of static hashing. This is because the HASH FUNCTION is chosen based on the size of the file at some ANTICIPATED point in the future.

18.

Which of the following operations can be performed on an extendable hash structure?(a) Lookup(b) Insertion(c) Deletion(d) All of the mentionedThe question was asked in an online quiz.My query is from Dynamic Hashing topic in division Indexing and Hashing of RDBMS

Answer»

Right OPTION is (d) All of the mentioned

Best EXPLANATION: We can perform LOOKUP, INSERTION and deletion on a dynamic hash structure.

19.

Dynamic hashing is also called as _________(a) Extended hashing(b) Extendable hashing(c) Static hashing(d) Movable hashingThe question was asked during an interview.This interesting question is from Dynamic Hashing topic in chapter Indexing and Hashing of RDBMS

Answer»

Correct choice is (B) Extendable HASHING

To ELABORATE: DYNAMIC hashing is also called as extendable hashing because it can accommodate the growth and shrinkage of the database.

20.

Dynamic hashing allows us to?(a) Accommodate the growth of the database(b) Accommodate the shrinkage of the database(c) Allows modification of hash function(d) All of the mentionedThe question was asked during an internship interview.My enquiry is from Dynamic Hashing topic in section Indexing and Hashing of RDBMS

Answer» CORRECT answer is (d) All of the mentioned

To explain: Dynamic hashing allows us to accommodate the GROWTH of the database and the SHRINKAGE of the database by allowing us to CHANGE the HASH function dynamically.
21.

State true or false: Hash indices are only primary index structures(a) True(b) FalseI had been asked this question in quiz.This intriguing question originated from Static Hashing in division Indexing and Hashing of RDBMS

Answer»

The correct ANSWER is (a) True

To explain: HASH indices are only secondary index STRUCTURES. A hash index is NEVER needed as a clustering index structure.

22.

Which of the following is the worst hash function among the given choices(a) The sum of the digits modulo 8(b) The sum of the digits modulo 2(c) The sum of the digits modulo 5(d) The sum of the digitsThe question was asked in unit test.This interesting question is from Static Hashing in portion Indexing and Hashing of RDBMS

Answer» CORRECT option is (d) The sum of the digits

To elaborate: The sum of the digits classifies the data into the highest number of BUCKETS, thus making the job to TRACK the buckets more DIFFICULT than the rest.
23.

State true or false: A hash index organizes the search keys, with their associated pointers, into a hash file structure(a) True(b) FalseThis question was addressed to me in an international level competition.Origin of the question is Static Hashing topic in portion Indexing and Hashing of RDBMS

Answer»

Correct answer is (a) True

For EXPLANATION: A hash INDEX organizes the SEARCH keys, with their associated pointers, into a hash file structure. We can construct a hash index by applying a hash function on a search KEY and store the key and its associated pointers in the bucket.

24.

Overflow handling using a linked list of buckets is called as ____________(a) Bucket chaining(b) Overflow chaining(c) Bucket linking(d) Overflow linkingI have been asked this question in an online interview.This interesting question is from Static Hashing in portion Indexing and Hashing of RDBMS

Answer»

Right answer is (b) Overflow chaining

Explanation: All the overflow buckets are chained together in a linked LIST. Overflow HANDLING USING a linked list of buckets is CALLED as Overflow chaining.

25.

Some buckets are assigned more records than the others which causes bucket overflow, this condition is called as ________(a) Bucket sufficiency(b) Bucket insufficiency(c) Bucket skew(d) Bucket normalcyI have been asked this question in quiz.My question is from Static Hashing in portion Indexing and Hashing of RDBMS

Answer»

Correct option is (c) Bucket skew

To explain: Some buckets are ASSIGNED more records than the others which causes bucket overflow, this CONDITION is called as Bucket skew. Skew occurs if multiple records have the same SEARCH key or if the given hash function is NON UNIFORM.

26.

What is a bucket overflow?(a) When a bucket does not have enough space(b) There are insufficient buckets(c) When Bucket skew occurs(d) All of the mentionedI have been asked this question in an international level competition.Query is from Static Hashing in portion Indexing and Hashing of RDBMS

Answer» RIGHT CHOICE is (d) All of the mentioned

Explanation: Bucket OVERFLOW can OCCUR in many ways. When a bucket does not have enough space, there are insufficient buckets, when a bucket skew OCCURS.
27.

In a __________ we organize the search keys, with their associated pointers, into a hash file structure(a) Hash file organization(b) Hash index organization(c) Hashing address(d) None of the mentionedThis question was posed to me by my school teacher while I was bunking the class.My question comes from Static Hashing in portion Indexing and Hashing of RDBMS

Answer»

Correct OPTION is (b) Hash index organization

Explanation: Hashing can be used for 2 DIFFERENT purposes, hash file organization and hash index organization. In a hash index organization, we organize the SEARCH KEYS, with their associated pointers, into a hash file structure.

28.

In a __________ , we obtain the address of the disk block containing a desired record directly by computing a function on the search key value of the record(a) Hash file organization(b) Hash index organization(c) Hashing address(d) None of the mentionedI have been asked this question in an internship interview.My doubt is from Static Hashing topic in section Indexing and Hashing of RDBMS

Answer»

The correct option is (a) Hash file organization

The explanation is: HASHING can be used for 2 DIFFERENT purposes, hash file organization and hash index organization. In a Hash file organization, we obtain the address of the DISK block containing a desired record directly by computing a function on the SEARCH KEY value of the record.

29.

If K denotes the set of all the search key values, and B denotes the set of all bucket addresses, a function from K to B is called as __________(a) Bucket function(b) Address function(c) Hash function(d) Search functionThis question was posed to me by my college director while I was bunking the class.This intriguing question comes from Static Hashing in division Indexing and Hashing of RDBMS

Answer» CORRECT answer is (c) HASH function

To elaborate: If K DENOTES the set of all the search key VALUES, and B denotes the set of all bucket addresses, a function h from K to B is called as the hash function. It determines which bucket should CONTAIN the data in question.
30.

The term ______ is used to denote a unit of storage that can store one or more records(a) Basket(b) Bucket(c) Unit(d) SetThis question was posed to me in an interview for internship.My question is taken from Static Hashing topic in section Indexing and Hashing of RDBMS

Answer»

Right ANSWER is (b) Bucket

Best EXPLANATION: The term bucket is used to DENOTE a unit of STORAGE that can store one or more records. A bucket is typically a disk block but it can ALSO be larger than a disk block.

31.

___________ are the indices that store the values of some attributes along with the pointers to the recor.(a) Binary indices(b) Covering indices(c) Key indices(d) Static indicesThis question was addressed to me during an online exam.I'm obligated to ask this question of B+ trees topic in chapter Indexing and Hashing of RDBMS

Answer»

The correct option is (b) Covering INDICES

To explain I would say: Covering indices are the indices that STORE the values of some attributes along with the pointers to the RECORD. STORING extra attribute values is USEFUL as they allow us to Answer queries without actually looking up the records.

32.

Insertion of a large number of entries at a time into an index is referred to as _______ of the index.(a) Bulk loading(b) Mass insertion(c) Quick insertion(d) Quick loadingI have been asked this question during an online exam.The origin of the question is B+ trees topic in section Indexing and Hashing of RDBMS

Answer»

Correct option is (a) BULK loading

To ELABORATE: Insertion of a large NUMBER of entries at a time into an index is referred to as bulk loading of the index. This reduces the time complexity as MULTIPLE entries are loaded at the same time.

33.

State true or false: The fanout of nodes can be increased by using a technique called _________(a) Prefix compression(b) Postfix compression(c) Prefix expansion(d) Postfix expansionThis question was addressed to me in semester exam.I need to ask this question from B+ trees topic in chapter Indexing and Hashing of RDBMS

Answer»

The CORRECT answer is (a) Prefix compression

Best explanation: The FANOUT of NODES can be increased by using a technique called prefix compression. In this, we do not store the entire value of the search key at the NODE. We only store the prefix of the search key.

34.

If a relation can have more than one record containing the same search key value, the search key is said to be a __________(a) Unique search key(b) Non unique search key(c) Multiple search key(d) Identical search keyI got this question by my school principal while I was bunking the class.The above asked question is from B+ trees topic in portion Indexing and Hashing of RDBMS

Answer»

The CORRECT option is (B) Non UNIQUE search key

For EXPLANATION: If a relation can have more than one record containing the same search key value, the search key is said to be a non-unique search key. A problem with non-unique search keys is inefficiency during delete operations.

35.

Statement 1: Insertion of record might require the change in position of the initial nodes.Statement 2: Deletion of records might require the change in position of the initial nodes.(a) Both the statements are true(b) Statement 1 is true but statement 2 is false(c) Statement 2 is true but statement 1 is false(d) Both the statements are falseThis question was addressed to me in an internship interview.The query is from B+ trees topic in section Indexing and Hashing of RDBMS

Answer»

The correct CHOICE is (a) Both the statements are true

To explain I WOULD say: Both insertion and deletion of records might require the change in position of the initial nodes because the new data value might not exactly fit into the B+ tree. THUS rotation of the nodes is generally REQUIRED.

36.

The queries used to find all records with search key values in a particular range are known as ________(a) Gap queries(b) Graph queries(c) Range queries(d) None of the mentionedI have been asked this question in a job interview.My question is taken from B+ trees topic in section Indexing and Hashing of RDBMS

Answer» CORRECT OPTION is (c) Range queries

The EXPLANATION: The queries used to find all records with search key values in a particular range are known as Range queries. These TYPE of queries are EXECUTED using procedures.
37.

Non-leaf nodes are also called as __________(a) Internal nodes(b) External nodes(c) Middle nodes(d) Primary nodesThis question was addressed to me in an online quiz.I'm obligated to ask this question of B+ trees in division Indexing and Hashing of RDBMS

Answer»

The correct option is (a) INTERNAL nodes

Easy explanation: Non leaf nodes are also KNOWN as internal nodes. A non-leaf node MAY hold up to N pointers and should hold at least n/2 pointers.

38.

What are the leaf nodes in a B+ tree?(a) The topmost nodes(b) The bottommost nodes(c) The nodes in between the top and bottom nodes(d) None of the mentionedThis question was posed to me in an online quiz.This interesting question is from B+ trees topic in division Indexing and Hashing of RDBMS

Answer»

The CORRECT choice is (B) The bottommost NODES

Easy explanation: The bottommost nodes that mark the end of a tree are KNOWN as the leaf nodes in a B+ tree.

39.

State true or false: B+ trees are not always balanced trees.(a) True(b) FalseThis question was posed to me at a job interview.My question is based upon B+ trees in portion Indexing and Hashing of RDBMS

Answer»

Right option is (B) False

To EXPLAIN I WOULD say: B+ TREES are always balanced. Every path from the root to the leaf of the tree is of the same length.

40.

A search key containing more than one attribute is called a _________ search key(a) Multiple(b) Multilevel(c) Composite(d) PrimaryThe question was asked in an interview for internship.This intriguing question originated from Ordered Indices in division Indexing and Hashing of RDBMS

Answer» CORRECT choice is (b) Multilevel

The explanation: A search KEY containing more than one attribute is called as a composite search key. The structure of the INDEX is the same as that of any other index, the only difference being that it is not a SINGLE search attribute but a list of ATTRIBUTES.
41.

Indices with two or more levels are called as?(a) Multiple Indices(b) Multilevel indices(c) Bi- tri- Indices(d) None of the mentionedI have been asked this question during an interview for a job.My question is based upon Ordered Indices topic in division Indexing and Hashing of RDBMS

Answer»

The correct answer is (B) MULTILEVEL indices

Easiest explanation: Indices with two or more levels are called as multilevel indices. They REQUIRE significantly few I/O OPERATIONS than SEARCHING using binary search.

42.

If an index entry appears for only some of the search key values in the file, it is called as ________(a) Dense key(b) Dense index(c) Sparse key(d) Sparse indexThe question was asked in class test.My question is taken from Ordered Indices topic in chapter Indexing and Hashing of RDBMS

Answer» CORRECT answer is (d) Sparse index

Easiest EXPLANATION: In a sparse index, an index ENTRY appears for only some of the search key values. Sparse indices can be used only if the relation is stored in the sorted ORDER of the search key i.e. if the index is a clustering index.
43.

If an index entry appears for every search key value in the file, it is called as ________(a) Dense key(b) Dense index(c) Sparse key(d) Sparse indexThe question was asked in an international level competition.Asked question is from Ordered Indices in division Indexing and Hashing of RDBMS

Answer» CORRECT option is (B) Dense index

For explanation: In a dense index, an index entry appears for every SEARCH key value in the file. In a dense CLUSTERING index, the index RECORD contains the search-key value and a pointer to the first data record with that search-key value.
44.

State true or false: Clustering indices are also called as primary indices(a) True(b) FalseThe question was asked in final exam.My question is from Ordered Indices topic in portion Indexing and Hashing of RDBMS

Answer»

The CORRECT OPTION is (a) True

The explanation is: If the file containing the RECORDS is sequentially ordered, a CLUSTERING index is an index whose search key ALSO defines the sequential order of the file. Clustering indices are also called as primary indices.

45.

If the file containing the records is sequentially ordered, a ___________ is an index whose search key also defines the sequential order of the file.(a) Clustering data(b) Cluttering index(c) Clustering index(d) Clustering numberThe question was posed to me in class test.The doubt is from Ordered Indices in section Indexing and Hashing of RDBMS

Answer»

The correct choice is (b) Cluttering index

Easiest EXPLANATION: If the file containing the records is SEQUENTIALLY ordered, a Clustering index is an index whose search key also defines the sequential order of the file. Clustering indices are also called as primary indices but they do not denote an index on the primary key. Such indices can be BUILT on any search key.

46.

The additional space occupied by an index structure is called as _________(a) Access modes(b) Space types(c) Access time(d) Space overheadThis question was addressed to me in my homework.This interesting question is from Ordered Indices topic in section Indexing and Hashing of RDBMS

Answer»

Right choice is (d) Space OVERHEAD

The EXPLANATION is: The additional space occupied by an index structure is called as space overhead. It is usually a WORTHWHILE sacrifice to achieve IMPROVED performance.

47.

The time it takes to delete a data item is called as _________(a) Insertion time(b) Deletion time(c) Time overhead(d) Access timeThe question was posed to me in an international level competition.This interesting question is from Ordered Indices topic in section Indexing and Hashing of RDBMS

Answer»

The correct CHOICE is (B) Deletion time

Explanation: The time it takes to DELETE a data item is CALLED as deletion time. This value includes finding the item to be deleted and the time taken to update the index structure.

48.

The time it takes to insert a new data item is called ____________(a) Insertion time(b) Deletion time(c) Time overhead(d) Access timeThe question was asked in homework.My doubt is from Ordered Indices in chapter Indexing and Hashing of RDBMS

Answer»

Right choice is (a) INSERTION time

To explain: The time it TAKES to insert a NEW data item is called Insertion time. This value includes the time taken to find the correct PLACE to insert the new data item as well as the time it takes to UPDATE the index structure.

49.

The time it takes to find a particular data item is called as ___________(a) Insertion time(b) Deletion time(c) Time overhead(d) Access timeThe question was posed to me in semester exam.The question is from Ordered Indices in section Indexing and Hashing of RDBMS

Answer»

Correct option is (d) Access TIME

For explanation: The time it TAKES to find a particular data item or a set of data ITEMS using the TECHNIQUE in question is called as access time.

50.

The types of access that are supported efficiently are called as ________(a) Access modes(b) Access types(c) Access time(d) Access overheadI got this question in an online quiz.My doubt stems from Ordered Indices in chapter Indexing and Hashing of RDBMS

Answer»

Right choice is (B) ACCESS types

Easy explanation: The types of access that are SUPPORTED efficiently are called as Access types. Access types can include finding records with a specified attribute VALUE or within a particular range.