RDBMS Chapter 4 Magnetic Tapes Magnetic Tapes Optical
RDBMS Chapter 4
Magnetic Tapes
Magnetic Tapes
Optical disk
Optical disk
Main Memory
Hard Disk
Hard Disk
Tracks and Sectors
Storage Access n Buffer Memory Main Memory Hard Disk Buffer Memory
File Organization (Fixed Length) Type deposit = record n account_number char(10); n branch_name char(22) n balance number(10) n End; n
File Organization (Fixed Length)
Variable Length records n Variable-length records arise in database systems in several ways: n Storage of multiple record types in a file. n Record types that allow variable lengths for one or more fields. n Record types that allow repeating fields (used in some older data models).
Slotted page Structure Slotted page header contains: • number of record entries • end of free space in the block • location and size of each record
Byte String Representation
Organization of records in file n n Heap – a record can be placed anywhere in the file where there is space Sequential – store records in sequential order, based on the value of the search key of each record Hashing – a hash function computed on some attribute of each record; the result specifies in which block of the file the record should be placed Records of each relation may be stored in a separate file. In a multitable clustering file organization records of several different relations can be stored in the same file n Motivation: store related records on the same block to minimize I/O
Hash Function Primary. Key*2*10 n 2*2*10= 40 n 1, 2 3, 4 5, 6 7, 8
Sequential File Organization n. The records in the file are ordered by a search-key
Deletion Of Data
Clustering File Organization n Store several relations in one file using a multitable clustering file organization
- Slides: 20