InterviewSolution
| 1. |
What do you understand about indexing in the context of Database Management Systems (DBMS)? What are the different types of indexing? |
|
Answer» Indexing is a data structure approach for retrieving records fast from a database file. A short table with only two COLUMNS is called an index. A duplicate of a table's primary or candidate key APPEARS in the first column. The second column of the table comprises a series of pointers that carry the address of the disk block where that particular key value is stored. An index takes a search key as input and returns a collection of matching records. The following are the different types of indexing in DBMS: 1. Primary Indexing: A primary index is a two-field, ordered file with a defined length. The first field is the same as the primary key, while the second field points to the data block of concern. There is ALWAYS a one-to-one relationship between the elements in the index table in the primary index. The primary indexing in a database management system is also divided into two types:
2. SECONDARY Indexing: In a database management system, a secondary index can be constructed by a field that has a unique value for each record and should be a candidate key. A non-clustering index is ANOTHER name for it. 3. Clustering Indexing: The records themselves, not references, are stored in a clustered index. Non-primary key columns are sometimes used to build indexes, and they may not be unique for each record. In this case, you can aggregate two or more columns to generate unique values and create a clustered index. This also aids in the faster identification of the record. |
|