Engineering Questions with Answers - Multiple Choice Questions

Database MCQ – Index Definition in SQL

1 - Question

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

View Answer

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

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

View Answer

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




3 - Question

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

View Answer

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

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

View Answer

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

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

View Answer

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




6 - Question

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

View Answer

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




7 - Question

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

View Answer

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




8 - Question

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

View Answer

Answer: a
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.




9 - Question

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

View Answer

Answer: b
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.




10 - Question

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

View Answer

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.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners