The document provides an overview of storage and indexing in databases. It discusses how data is stored on external storage devices like disks and tapes. It also describes different file organizations like heap files and cluster files that arrange records on storage. Finally, it covers indexing, explaining that indexes allow efficient retrieval of records based on key fields and common types of indexes include primary, secondary, and clustering indexes.
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
overview of storage and indexing BY-Pratik kadam
1. End Term Examination.
on
Overview of Storage and Indexing.
Presented by
PRATIK KADAM.
URN. 2020-M-02101997
Under the Supervision of
Professor
ALTAF SHAH.
Practical Approach to DB System (CSC505)
2. INDEX
• Overview of Storage and Indexing………..3
• Data on external storage…………………..4-8
• File Organizations………………………...9-12
• Indexing…………………………………..13-15
3. Overview of Storage and Indexing.
Introduction.
• Memory is the process of storing and recalling information that was previously acquired.
Memory occurs through three fundamental stages: encoding, storage, and retrieval.
• Storing refers to the process of placing newly acquired information into memory, which is
modified in the brain for easier storage.
In the overview of storage and indexing we are going to see following topics:
Data on external storage
File Organizations
Indexing
4. Data on external storage.
• Data in a DBMS is stored on storage devices such as disks and tapes.
• The disk space manager is responsible for keeping track of available disk space.
• The file manager, which provides the abstraction of a file of records to higher levels of DBMS
code, issues requests to the disk space manager to obtain and relinquish space on disk.
6. Data on external storage.
Storage Manager Component :
• A Storage Manager is a component or program module that provides the interface between the
low-level data stored in the database and the application programs/queries submitted to the
system. The Storage Manager Components include –
• File Manager : File manager manages the file space and it takes care of the structure of the
file. It manages the allocation space on disk storage and the data structures used to represent
info stored on other media.
• Buffer Manager : It transfers blocks between disk (or other devices) and Main Memory. A
DMA (Direct Memory Access) is a form of Input/Output that controls the exchange of blocks
process. When a processor receives a request for a transfer of a block, it sends it to the DMA
Controller which transfers the block uninterrupted.
7. Data on external storage.
• Authorization and Integrity Manager: This Component of storage manager checks for the
authority of the users to access and modify information, as well as integrity constraints (keys,
etc).
• Disk Manager : The block requested by the file manager is transferred by the Disk Manager.
Data on External Storage:
• Disks: Can retrieve random page at fixed cost But reading several consecutive pages is much
cheaper than reading them in random order.
• Tapes: Can only read pages in sequence. Cheaper than disks; used for archival storage.
8. Data on external storage.
• File organization: Method of arranging a file of records on external storage. Record id (rid) is
sufficient to physically locate record _x005F_x0001_. Indexes are data structures that allow us
to find the record ids of records with given values in index search key fields.
• Architecture: Buffer manager stages pages from external storage to main memory buffer pool.
File and index layers make calls to the buffer manager.
9. File Organizations:
Storing the files in certain order is called file organization. The main objective of file
organization is:
• Optimal selection of records i.e.; records should be accessed as fast as possible.
• Any insert, update or delete transaction on records should be easy, quick and should not harm
other records.
• No duplicate records should be induced as a result of insert, update or delete.
• Records should be stored efficiently so that cost of storage is minimal.
13. Indexing:
When a database is very huge, even a smallest transaction will take time to perform the action. In
order to reduce the time spent in transactions, Indexes are used. Indexes are similar to book
catalogues in library or even like an index in a book. What it does? It makes our search simpler and
quicker. Same concept is applied here in DBMS to access the files from the memory.
Indexing in database systems is similar to what we see in books.
Indexing is a data structure technique to efficiently retrieve records from the database files based on
some attributes on which the indexing has been done.
14. Indexing:
Indexing is defined based on its indexing attributes. Indexing can be of the following types :
Primary Index :
Primary index is defined on an ordered data file. The data file is ordered on a key field. The key field
is generally the primary key of the relation.
Secondary Index :
Secondary index may be generated from a field which is a candidate key and has a unique value in
every record, or a non-key with duplicate values.
Clustering Index :
Clustering index is defined on an ordered data file. The data file is ordered on a non-key field.
15. Indexing:
Dense Index :
In dense index, there is an index record for every search key value in the database. This makes
searching faster but requires more space to store index records itself. Index records contain search
key value and a pointer to the actual record on the disk.