Recall & Review
beginner
What is a database index?
A database index is like a shortcut in a book's table of contents. It helps the database find data faster without looking at every row.
Click to reveal answer
beginner
How does an index improve database queries?
An index speeds up queries by letting the database quickly locate the data instead of scanning the whole table.
Click to reveal answer
intermediate
What is a downside of using too many indexes?
Too many indexes slow down data changes like inserts, updates, and deletes because the indexes must be updated too.
Click to reveal answer
beginner
What types of columns are good candidates for indexing?
Columns used often in search conditions or joins, like IDs or foreign keys, are good for indexes.
Click to reveal answer
intermediate
What is a unique index?
A unique index ensures that all values in a column are different, preventing duplicate entries.
Click to reveal answer
What does a database index do?
✗ Incorrect
A database index helps the database find data faster, improving query speed.
Which column is best to index?
✗ Incorrect
Columns used often in search queries benefit most from indexing.
What is a risk of having too many indexes?
✗ Incorrect
Too many indexes slow down inserts, updates, and deletes because indexes must be updated.
What does a unique index enforce?
✗ Incorrect
A unique index ensures all values in the indexed column are different.
When should you avoid adding an index?
✗ Incorrect
Indexing columns rarely used in queries wastes resources and slows data changes.
Explain what a database index is and how it helps with query performance.
Think of a book's table of contents.
You got /3 concepts.
Describe the trade-offs of using indexes in a database.
Indexes help reading but can slow writing.
You got /4 concepts.