Strorage and File Structure
File Organization
Fixed-Length Records
Difficult to delete a record from this structure
Some records will cross block boundaries
Variable-Length Records
Byte-String Representation: attach a end-of-record
not easy to reuse space occupied by a deleted record. lead to a large number of small fragment
no space for records to grow longer
Fixed-Length Representation
Reserved space: require a maximum record length
it is useful when most records have a length close to the maximum length. otherwise, a significant amount of space may be wasted
List representation: list of fixed-length record chaind together by pointers
space except the first in a chain may be wasted
Organizaiton of Records in File
Sequential file organization
designed for efficient processing of records in sorted order based on some search-key
Clustering file organization
store related records of two or more relations together. it is efficient for join operation, but it results in slowing processing other type of query.
Heap file organization
any record is placed anywhere in the file
Hashing file organization
hash, hash, hash...
File Organization
Fixed-Length Records
Difficult to delete a record from this structure
Some records will cross block boundaries
Variable-Length Records
Byte-String Representation: attach a end-of-record
not easy to reuse space occupied by a deleted record. lead to a large number of small fragment
no space for records to grow longer
Fixed-Length Representation
Reserved space: require a maximum record length
it is useful when most records have a length close to the maximum length. otherwise, a significant amount of space may be wasted
List representation: list of fixed-length record chaind together by pointers
space except the first in a chain may be wasted
Organizaiton of Records in File
Sequential file organization
designed for efficient processing of records in sorted order based on some search-key
Clustering file organization
store related records of two or more relations together. it is efficient for join operation, but it results in slowing processing other type of query.
Heap file organization
any record is placed anywhere in the file
Hashing file organization
hash, hash, hash...