|
|
Line 1: |
Line 1: |
| {{unreferenced|date=March 2013}}
| | The individual who wrote the article is known as Jayson Hirano and he totally digs that name. To play lacross is one of the issues she enjoys most. Office supervising is exactly where my primary earnings comes from but I've usually needed my own business. Ohio is exactly where his house is and his family members enjoys it.<br><br>Also visit my web site: [http://m-card.co.kr/xe/mcard_2013_promote01/29877 telephone psychic] |
| [[Table (database)|Database tables]] and [[Database index|indexes]] may be stored on disk in one of a number of forms, including ordered/unordered [[Flat file database|flat files]], [[ISAM]], heap files, [[Hash table|hash buckets]], or [[B+ tree]]s. Each form has its own particular advantages and disadvantages. The most commonly used forms are B+ trees and ISAM. Such forms or structures are one aspect of the overall schema used by a [[database engine]] to store information.
| |
| | |
| ==Unordered==
| |
| | |
| {{Expand section|date=June 2008}}
| |
| '''Unordered''' storage typically stores the records in the order they are inserted. Such storage offers good insertion [[Algorithmic efficiency|efficiency]] (<math>O\left(1\right)</math>), but inefficient retrieval times (<math>O\left(n\right)</math>). Typically these retrieval times are better, however, as most databases use indexes on the [[primary key]]s, resulting in retrieval times of <math>O\left(\log n\right)</math> or <math>O\left(1\right)</math> for keys that are the same as the database row offsets within the storage system.
| |
| | |
| ==Ordered==
| |
| | |
| {{Expand section|date=June 2008}}
| |
| '''Ordered''' storage typically stores the records in order and may have to rearrange or increase the file size when a new record is inserted, resulting in lower insertion efficiency. However, ordered storage provides more efficient retrieval as the records are pre-sorted, resulting in a complexity of <math>O\left(\log n\right)</math>.
| |
| | |
| ==Structured files==
| |
| | |
| ===Heap files===
| |
| | |
| * Simplest and most basic method
| |
| ** insert efficient, with new records added at the end of the file, providing chronological order
| |
| ** retrieval inefficient as searching has to be linear
| |
| ** deletion is accomplished by marking selected records as "deleted"
| |
| ** requires periodic reorganization if file is very {{clarify span|volatile|date=September 2012}}
| |
| | |
| * Advantages
| |
| ** efficient for bulk loading data
| |
| ** efficient for relatively small relations as indexing overheads are avoided
| |
| ** efficient when retrievals involve large proportion of stored records
| |
| * Disadvantages
| |
| ** not efficient for selective retrieval using key values, especially if large
| |
| ** sorting may be time-consuming
| |
| ** not suitable for {{clarify span|volatile|date=September 2012}} tables
| |
| | |
| Heap files are lists of unordered records of variable size. Although sharing a similar name, heap files are widely different from in-memory [[Heap (data structure)|heaps]].{{Elucidate|date=September 2012}}
| |
| | |
| ===Hash buckets===
| |
| {{main|Hash table}}
| |
| | |
| * Hash functions calculate the address of the page in which the record is to be stored based on one or more fields in the record
| |
| ** hashing functions chosen to ensure that addresses are spread evenly across the address space
| |
| ** ‘occupancy’ is generally 40% to 60% of the total file size
| |
| ** unique address not guaranteed so collision detection and collision resolution mechanisms are required
| |
| * Open addressing
| |
| * Chained/unchained overflow
| |
| * Pros and cons
| |
| ** efficient for exact matches on key field
| |
| ** not suitable for range retrieval, which requires sequential storage
| |
| ** calculates where the record is stored based on fields in the record
| |
| ** hash functions ensure even spread of data
| |
| ** collisions are possible, so collision detection and restoration is required
| |
| | |
| ===B+ trees===
| |
| {{main|B+ tree}}
| |
| | |
| These are the most commonly used in practice.
| |
| * Time taken to access any record is the same because the same number of nodes is searched
| |
| * Index is a full index so data file does not have to be ordered
| |
| * Pros and cons
| |
| ** versatile data structure – sequential as well as random access
| |
| ** access is fast
| |
| ** supports exact, range, part key and pattern matches efficiently
| |
| ** volatile files are handled efficiently because index is dynamic – expands and contracts as table grows and shrinks
| |
| ** less well suited to relatively stable files – in this case, ISAM is more efficient
| |
| | |
| ===ISAM===
| |
| {{main|ISAM}}
| |
| {{Expand section|date=June 2008}}
| |
| | |
| == Data orientation ==
| |
| | |
| Most conventional [[relational database]]s use "row-oriented" storage, meaning that all data associated with a given row is stored together. By contrast, [[column-oriented DBMS]] store all data from a given column together in order to more quickly serve [[data warehouse]]-style queries. [[Correlation database]]s are similar to row-based databases, but apply a layer of indirection to map multiple instances of the same value to the same numerical identifier.
| |
| | |
| {{Databases}}
| |
| | |
| {{DEFAULTSORT:Database Storage Structures}}
| |
| [[Category:Databases]]
| |
| [[Category:Database management systems]]
| |
| [[Category:Database theory]]
| |
The individual who wrote the article is known as Jayson Hirano and he totally digs that name. To play lacross is one of the issues she enjoys most. Office supervising is exactly where my primary earnings comes from but I've usually needed my own business. Ohio is exactly where his house is and his family members enjoys it.
Also visit my web site: telephone psychic