Search Header Logo

SQL Index MCQs

Authored by Dinesh Kumar

Other

Professional Development

Used 1+ times

SQL Index MCQs
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the main purpose of an index in SQL?

Compress tables

Improve query performance

Encrypt data

Create temporary tables

Answer explanation

The main purpose of an index in SQL is to improve query performance by allowing the database to find and retrieve data more quickly, rather than scanning the entire table.

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which type of index determines the physical order of data?

Non-clustered

Clustered

Composite

Unique

Answer explanation

A clustered index determines the physical order of data in a table, meaning the data rows are stored in the same order as the index. In contrast, a non-clustered index maintains a separate structure, not affecting physical data order.

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

How many clustered indexes can a table have?

One

Two

Unlimited

One per column

Answer explanation

A table can have only one clustered index because it defines the physical order of data rows. This unique index ensures that the data is stored in a sorted manner based on the indexed column, making retrieval efficient.

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What does a non-clustered index store?

Actual table data

Only metadata

Pointers to rows in the table

Only nulls

Answer explanation

A non-clustered index does not store actual table data but instead contains pointers to the rows in the table. This allows for faster searches without duplicating the data, making 'Pointers to rows in the table' the correct choice.

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which index is typically used on low-cardinality columns?

B-Tree Index

Bitmap Index

Function-Based Index

Unique Index

Answer explanation

A Bitmap Index is ideal for low-cardinality columns because it efficiently represents the presence or absence of values using bits, making it suitable for columns with a limited number of distinct values.

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is a composite index?

Index made up of a foreign key

Index using multiple columns

Duplicate index

Self-joining index

Answer explanation

A composite index is an index that uses multiple columns to improve query performance. This allows for more efficient data retrieval compared to single-column indexes, making 'Index using multiple columns' the correct choice.

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is a B-Tree index?

Bitmap tree

Balanced tree structure

Binary decision tree

Sorted array

Answer explanation

A B-Tree index is a balanced tree structure that maintains sorted data and allows for efficient insertion, deletion, and search operations. This makes it ideal for database indexing, unlike the other options listed.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?