Differences between database indexing and sorting
Indexing
(i) It takes relatively less time to sort random data.
(ii) After indexing the data file in this method, new records are automatically added to the correct location.
(iii) Sorting of data file by indexing method keeps serialization of records of file in main table.
(iv) When a data file is indexed, a new index file is created and the original table file remains unchanged.
(v) Sorting by indexing requires additional space in memory as additional index files are created.
(vi) Alphabetically, Numerically, Indexing can be done.
Sorting
(i) Sorting random data takes more time than indexing.
(ii) After sorting the data file in this method, if new records are added, the file has to be sorted again.
(iii) When the data file is sorted by the sorting method, the serialization of the records in the original table file is not correct.
(iv) When the data file is sorted, the original table file is stored in memory in a sorted state.
(v) Sorting by sorting does not require additional space as the original table file changes.
(vi) Sorting can be done in Ascending, Descending order.
Comments
Post a Comment