List the types of file organization




















Artificial Intelligence. Cloud Computing. Data Science. Angular 7. Machine Learning. Data Structures. Operating System. Computer Network. Compiler Design. Computer Organization. Discrete Mathematics. Ethical Hacking. Computer Graphics. This site uses Akismet to reduce spam. Learn how your comment data is processed. Skip to content shares.

Previous Previous. Next Continue. Cons —. Skip to content. Change Language. Related Articles. Relational model relational algebra, tuple calculus. Database design integrity constraints, normal forms. Query languages SQL. Transactions and concurrency control. DBMS Quiz. Table of Contents. Improve Article. Heap is a good storage structure in the following situations:. When data is being bulk-loaded into the relation.

The relation is only a few pages long. In this case, the time to locate any tuple is Short, even if the entire relation has been searched serially. When every tuple in the relation has to be retrieved in any order every time the relation is accessed.

For example, retrieve the name of all the students. Heap files are inappropriate when only selected tuples of a relation are to be accessed. In a hash file, records are not stored sequentially in a file instead a hash function is used to calculate the address of the page in which the record is to be stored.

The field on which hash function is calculated is called as Hash field and if that field acts as the key of the relation then it is called as Hash key. Records are randomly distributed in the file so it is also called as Random or Direct files.

Commonly some arithmetic function is applied to the hash field so that records will be evenly distributed throughout the file. Hash is a good storage structure in the following situations:. When tuples are retrieve based on an exact match on the hash field value, particularly if the access order is random. Hash is not a good storage structure in the following situations:.

When tuples are retrieved based on a range of values for the hash field. When tuples re retrieved based on a field other than the hash field. When tuples are retrieved based on only part of the hash field. When the hash field frequently updated. When a hash field updated, the DBMS must deleted the entire tuple and possible relocate it to a new address if the has function results in a new address.

Thus, frequent updating of the hash field impacts performance. However, there may be frequent access to this relation based on the Roll Number attribute. In this case, we may decide to add Roll Number as a secondary index.

There is an overhead involved in the maintenance and use of secondary indexes that has to be balanced against the performance improvement gained when retrieving data. This overhead includes:.



0コメント

  • 1000 / 1000