Storage Memory Hierarchy in database
Let’s discuss the storage memory hierarchy based on speed of access used in database systems.
- It is very fast.
- Stores the data in registers.
- Processes the data values, evaluates the arithmetics expressions, computes the address for data values, etc.
- RAM is thousands time slower than CPU.
- cache is an intermediate storage between RAM and CPU.
- Helps to fetch the data from RAM in advance.
- Gives CPU an illusion of having a faster Main memory storage.
- Faster than RAM but slower than CPU.
- Stores frequently used program instructions to increase the general speed of a system.
- Uses an optimistic approach of prefetching the data from disk drives.
- Faster then Hard disk, but slower than Cache.
- The smallest storage unit is 1 byte.
- Used as permanent storage for systems that need faster storage access.
- Offers 10X speed compared to magnetic disk drives.
- Costlier than RAM, but cheaper than magnetic disk drives.
- Used by some inmemory databases and cloud based file systems.
Magnetic disk drives:
- Has a few rigid rapidly rotating disks (platters) coated with magnetic material.
- These are cheaper and widely used to store persistent data.
- Read and write are in the volumn of blocks.
Tape drives are obsolete. Need not discuss them now.