Indexing and Hashing in Database Management

This quiz contains multiple-choice problems on index definition, bitmap, ordered indices and various hashing techniques.

Start Quiz

In a __ clustering index, the index record contains the search-key value and a pointer to the first data record with that search-key value, and the rest of the records will be in the sequential pointers.

Continuous

Sparse

Straight

Dense

The goal of hashing is to produce a search that takes __ time.

O(1)

O(n^2)

O(log n)

O(n*log n)

A hash table can store a maximum of 10 records; currently, there are records in locations 1, 3, 4, 7, 8, 9, 10. The probability of a new record going into location 2, with hash functions resolving collisions by linear probing, is

0.1

0.6

0.2

0.5

Consider a hash table of size seven, with starting index zero and hash function (3x + 4)mod7. Assuming the hash table is initially empty, which of the following are the contents of the table when the sequence 1, 3, 8, 10 is inserted into the table using closed hashing (note that ‘_’ denotes an empty location in the table)?

8, _, _, _, _, _, 10

1, 8, 10, _, _, _, 3

1, _, _, _, _, _,3

1, 10, 8, _, _, _, 3

Before attempting any changes to database structure, one must first

Clearly understand the current structure and contents of the database only

Test any changes on a test database only

Create a complete backup of the operational database only

All of the above

How can you find rows that do not match some specified condition?

EXISTS

Double use of NOT EXISTS

NOT EXISTS

None of the above

Which of the following SQL statements are helpful in database redesign?

Correlated subqueries only

EXISTS/NOT EXISTS expressions only

Both of the above

None of the above

Which of the following SQL-92 standard SQL commands can be used to change a table name?

RENAME TABLE

CHANGE TABLE

ALTER TABLE

None of the above

If ‘h‘ is any hashing function and is used to hash ‘n‘ keys into a table of size ‘m‘, where n<=m, the expected number of collisions involving a particular key ‘x‘ is

Less than 1

Less than n

Less than m

Less than n/2

The __ index is created for larger index values if they exist.

Multi-level

Sequential

Pointed

Multiple

The searching technique that takes O(1) time to find particular data is

Linear search

Binary search

Hashing

Tree search

The process of reading a database schema and producing a data model from it is known as

Data modeling

Database design

Reverse engineering

None of the above

In ordered indices, if the file containing the records is sequentially ordered, a __’s search key also defines the sequential order of the file.

Non-clustered index

Structured index

Unstructured index

Clustered index

An __ consists of a search-key value and pointers to one or more records with that value as their search-key value.

Index hash

Index entry

Index cluster

Index map

The search key of __ indices specifies an order different from the sequential order of the file.

Non-clustered

Secondary

Both of the above

None of the above

Quiz/Test Summary
Title: Indexing and Hashing in Database Management
Questions: 15
Contributed by:
Ivan