0% found this document useful (0 votes)
33 views11 pages

DBMS

Uploaded by

akshithakoora459
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views11 pages

DBMS

Uploaded by

akshithakoora459
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

File Organizing and

Indexing
KOORA AKSHITHA
23H51A0536
What is a File?
A file is named a collection of related information that is
recorded on secondary storage such as magnetic disks,
magnetic tapes, and optical disks.

What is File Organization?


File Organization refers to the logical relationships
among various records that constitute the file,
particularly with respect to the means of identification
and access to any specific record. In simple terms,
Storing the files in a certain order is called File
Organization
Types of File Organizations
Various methods have been introduced to Organize files.

Sequential File Organization


The easiest method for file Organization is the Sequential method. In
this method, the file is stored one after another in a sequential
manner. There are two ways to implement this method:
1. Pile File Method 2. Sorted File
Method
Heap File Organization
Heap File Organization works with data blocks. In this
method, records are inserted at the end of the file, into the
data blocks. No Sorting or Ordering is required in this method.
If a data block is full, the new record is stored in some other
block, Here the other data block need not be the very next
data block, but it can be any block in the memory.
B+ Tree File Organisation
As the name suggests, uses a
ISAM (Indexed
tree-like structure to store Sequential Access
records in a File. It uses the Method):
concept of Key indexing where A combination of sequential
the primary key is used to sort and indexed methods. Data
the records. For each primary
key, an index value is generated
is stored sequentially, but an
and mapped with the record. An index is maintained for faster
index of a record is the address access. Think of it like having
of the record in the file. a bookmark in a book that
guides you to specific pages.
Cluster File Organization
In Cluster file organization, two or more related tables/records
are stored within the same file known as clusters. These files will
have two or more tables in the same data block and the key
attributes which are used to map these tables together are
stored only once.
Thus it lowers the cost of searching and retrieving various
records in different files as they are now combined and kept in a
single cluster.
Hash File Organization

Hash File Oragnization

Static Hashing Dynamic Hashing

Open Closed Quadratic Double


Hashing Hashing Hashing Hashing
Indexing
Indexing improves database performance by minimizing the number of disc
visits required to fulfill a query. It is a data structure technique used to locate
and quickly access data in databases. To speed up data retrieval, the values
are also kept in sorted order.
Attributes of Indexing
•Access Types: This refers to the type of access
such as value-based search, range access, etc.
•Access Time: It refers to the time needed to find
a particular data element or set of elements.
•Insertion Time: It refers to the time taken to find
the appropriate space and insert new data.
•Deletion Time: Time taken to find an item and
delete it as well as update the index structure.
•Space Overhead: It refers to the additional space required by the index.
Types of Indexing
Conclusion
In conclusion, we can say that both file organization
and indexing complement each other to ensure
efficient database operations. Properly chosen
strategies based on the nature of the data and the
query patterns can significantly enhance the
performance of the database system, optimizing both
storage and retrieval processes. Effective
management of these two elements is essential for
building high-performance databases capable of
handling large-scale, complex queries in minimal time.

You might also like