Database Management System Questions and Answers Part-35

1. What is the purpose of the index in sql server?
a) To enhance the query performance
b) To provide an index to a record
c) To perform fast searches
d) All of the mentioned

Answer: d
Explanation: A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of additional writes.

2. How many types of indexes are there in sql server?
a) 1
b) 2
c) 3
d) 4

Answer: b
Explanation: They are clustered index and non clustered index.

3. How non clustered index point to the data?
a) It never points to anything
b) It points to a data row
c) It is used for pointing data rows containing key values
d) None of the mentioned

Answer: c
Explanation: Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value.

4. Which one is true about clustered index?
a) Clustered index is not associated with table
b) Clustered index is built by default on unique key columns
c) Clustered index is not built on unique key columns
d) None of the mentioned

Answer: b
Explanation: Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value.

5. What is true about indexes?
a) Indexes enhance the performance even if the table is updated frequently
b) It makes harder for sql server engines to work to work on index which have large keys
c) It doesn’t make harder for sql server engines to work to work on index which have large keys
d) None of the mentioned

Answer: b
Explanation: Indexes tend to improve the performance.

6. Does index take space in the disk?:
a) It stores memory as and when required
b) Yes, Indexes are stored on disk
c) Indexes are never stored on disk
d) Indexes take no space

Answer: b
Explanation: Indexes take memory slots which are located on the disk.

7. What are composite indexes?
a) Are those which are composed by database for its internal use
b) A composite index is a combination of index on 2 or more columns
c) Composite index can never be created
d) None of the mentioned

Answer: b
Explanation: A composite index is an index on two or more columns of a table.

8. If an index is _________________ the metadata and statistics continue to exists
a) Disabling
b) Dropping
c) Altering
d) Both Disabling and Dropping

Answer: a
Explanation: If an index is disabling the metadata and statistics continue to exists

9. In _______________ index instead of storing all the columns for a record together, each column is stored separately with all other rows in an index.
a) Clustered
b) Column store
c) Non clustered
d) Row store

Answer: b
Explanation: In column store index instead of storing all the columns for a record together, each column is stored separately with all other rows in an index.

10. A _________________ index is the one which satisfies all the columns requested in the query without performing further lookup into the clustered index.
a) Clustered
b) Non Clustered
c) Covering
d) B-Tree

Answer: c
Explanation: A covered query is a query where all the columns in the query’s result set are pulled from non-clustered indexes.