Complete the code to define the main purpose of a database index.
A database index is used to [1] data retrieval speed.The main purpose of a database index is to increase data retrieval speed by allowing faster searches.
Complete the code to specify the common data structure used for database indexes.
Most database indexes use a [1] tree structure for efficient searching.
B+ trees are commonly used in databases because they keep data sorted and allow fast insertion, deletion, and search.
Fix the error in the statement about index types.
A [1] index stores a mapping from keys to row locations using a hash function.
Hash indexes use a hash function to map keys to row locations, enabling fast equality searches.
Fill both blanks to complete the description of clustered indexes.
A clustered index [1] the data rows in the table based on the index key, unlike a non-clustered index which [2] a separate structure.
Clustered indexes sort the actual data rows according to the index key. Non-clustered indexes maintain a separate structure pointing to data.
Fill all three blanks to complete the code for a simple index creation statement.
CREATE [1] INDEX [2] ON [3] (column_name);
This statement creates a temporary index named 'idx_customer_name' on the 'customers' table.