Friday, August 20, 2010

Storage structures

Databases may store relational tables/indexes in memory or on hard disk in one of many forms:
ordered/unordered flat files
ISAM
heaps
hash buckets
logically-blocked files
B+ trees
The most commonly used[citation needed] are B+ trees and ISAM.
Object databases use a range of storage mechanisms. Some use virtual memory-mapped files to make the native language (C++, Java etc.) objects persistent. This can be highly efficient but it can make multi-language access more difficult. Others disassemble objects into fixed- and varying-length components that are then clustered in fixed sized blocks on disk and reassembled into the appropriate format on either the client or server address space. Another popular technique involves storing the objects in tuples (much like a relational database) which the database server then reassembles into objects for the client.[citation needed]
Other techniques include clustering by category (such as grouping data by month, or location), storing pre-computed query results, known asmaterialized views, partitioning data by range (e.g., a data range) or by hash.
Memory management and storage topology can be important design choices for database designers as well. Just as normalization is used to reduce storage requirements and improve database designs, conversely denormalization is often used to reduce join complexity and reduce query execution time.[5]

No comments:

Post a Comment