37 Lecture

CS403

Midterm & Final Term Short Notes

Index

In computer science, an index is a data structure that is used to improve the speed and efficiency of data retrieval operations. It allows for quick access to specific data items based on a specific attribute or key value. Indexing is commonly u


Important Mcq's
Midterm & Finalterm Prepration
Past papers included

Download PDF
  1. What is an index in a database? a) A list of all data in the database b) A data structure used to improve data retrieval c) A backup of the entire database d) A list of all queries run on the database Answer: b) A data structure used to improve data retrieval Which of the following is a common type of database index? a) Binary search tree b) Linked list c) Queue d) Stack Answer: a) Binary search tree What is the purpose of an index in a search engine? a) To improve the relevance of search results b) To speed up the retrieval of search results c) To store all search queries d) To store all web pages on the internet Answer: b) To speed up the retrieval of search results In a database, what is a primary key index? a) An index that contains all data in the database b) An index that includes only unique values of a particular column c) An index that contains a copy of the entire database d) An index that is used to store backup data Answer: b) An index that includes only unique values of a particular column Which of the following is a disadvantage of using indexes in a database? a) Improved data retrieval performance b) Increased storage requirements c) Increased security risks d) Reduced data consistency Answer: b) Increased storage requirements What is an inverted index used for? a) Indexing databases b) Indexing search engines c) Indexing file systems d) Indexing social media platforms Answer: b) Indexing search engines What is a clustered index in a database? a) An index that stores data in a specific order based on a particular column b) An index that stores all data in the database c) An index that includes only unique values of a particular column d) An index that is used to store backup data Answer: a) An index that stores data in a specific order based on a particular column What is a non-clustered index in a database? a) An index that stores data in a specific order based on a particular column b) An index that stores all data in the database c) An index that includes only unique values of a particular column d) An index that is used to store backup data Answer: c) An index that includes only unique values of a particular column Which of the following is a common type of file system index? a) Binary search tree b) Linked list c) Queue d) Stack Answer: b) Linked list What is a hash index used for? a) Indexing databases b) Indexing search engines c) Indexing file systems d) Indexing social media platforms Answer: a) Indexing databases


Subjective Short Notes
Midterm & Finalterm Prepration
Past papers included

Download PDF
  1. What is an index in a database? Answer: An index in a database is a data structure used to improve data retrieval performance by allowing quick access to specific data items based on a specific attribute or key value. How does indexing improve the performance of data retrieval operations? Answer: Indexing creates a data structure that organizes data in a specific way, allowing for faster search and retrieval of specific data items based on a particular attribute or key value. What is a primary key index in a database? Answer: A primary key index in a database is an index that includes only unique values of a particular column and is used to ensure data consistency and integrity. What is a clustered index in a database? Answer: A clustered index in a database is an index that stores data in a specific order based on a particular column, allowing for fast retrieval of data in that order. What is a non-clustered index in a database? Answer: A non-clustered index in a database is an index that includes only unique values of a particular column and is used to speed up data retrieval operations for non-clustered queries. What is an inverted index used for? Answer: An inverted index is used in search engines to speed up data retrieval by storing a list of documents that contain each word in a document collection. What is a file system index? Answer: A file system index is a data structure used to speed up data retrieval operations in file systems by allowing quick access to specific files based on attributes like file name, date, and size. How does indexing affect database storage requirements? Answer: Indexing increases database storage requirements, as indexes must be stored alongside the data they index. What is a hash index used for? Answer: A hash index is used in databases to speed up data retrieval operations by storing a hash value for each data item based on its key value. What are some common challenges associated with indexing large data sets? Answer: Some common challenges associated with indexing large data sets include increased storage requirements, slower insert and update operations, and the need for periodic index maintenance to ensure data consistency and integrity.

In a database, an index is a data structure that is used to improve the performance of data retrieval operations. Indexes can be created on one or more columns in a table, allowing for fast access to specific data items based on the values of those columns. Indexing can speed up data retrieval operations by many orders of magnitude, making it an essential technique for managing large data sets. In a relational database, a primary key index is often used to ensure data consistency and integrity. This index includes only unique values of a particular column, and it is used to enforce the uniqueness constraint on that column. A clustered index is another common type of index in a database. This index stores data in a specific order based on a particular column, allowing for fast retrieval of data in that order. Non-clustered indexes are used to speed up data retrieval operations for non-clustered queries. An inverted index is another type of index that is commonly used in search engines. This index stores a list of documents that contain each word in a document collection, allowing for fast retrieval of relevant documents based on search queries. In file systems, indexing is used to speed up data retrieval operations by allowing quick access to specific files based on attributes like file name, date, and size. However, indexing can also increase storage requirements and slow down insert and update operations. To ensure data consistency and integrity, periodic index maintenance is often necessary. Overall, indexing is an essential technique for managing large data sets and improving the performance of data retrieval operations in databases and file systems.