You are on page 1of 14

DBMS

-Nethra

The structure of file


Cache Main Memory (MM Flash memory Magnetic-disk storage: Optical storage Tape Storage

Primary storage Secondary (or on-line) storage Tertiary (or off-line) storage

Indexing and hashing

Database index
Database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of slower writes and increased storage space. Indexes -created using one or more columns of a database table, basis -both rapid random look ups and efficient access of ordered records. The disk space required to store less - since indexes usually contain only the key-fields according to which the table is to be arranged, and exclude all the other details in the table.

Types
Dense Index Sparse Index Primary Index Multilevel index Secondary index

Dense Index
An index record appears for every search key value in file. This record contains search key value and a pointer to the actual record.

Sparse Index
Index records are created only for some of the records. To locate a record, we find the index record with the largest search key value less than or equal to the search key value we are looking for. We start at that record pointed to by the index record, and proceed along the pointers in the file (that is, sequentially) until we find the desired record.

Secondary index

Multilevel Indexing

Hashing
A hash function is any well-defined procedure or mathematical function that converts a large, possibly variable-sized amount of data into a small datum, The values returned by a hash function are called hash values, hash codes, hash sums, checksums or simply hashes. Hash functions are mostly used
to speed up table lookup data comparison tasks such as finding items in a database, detecting duplicated or similar records in a large file, finding similar stretches in DNA sequences, and so on.

You might also like