←Back to Subject
Notes
Notes
Study material and explanations
Diagrams
Diagrams
Visualize concepts easily
Mnemonics
Mnemonics
Tricks to remember faster
One Night Prep
One Night Prep
Short and focused revision
Revision
Revision
Quick summary and key points
Important Questions
Important Questions
Practice most relevant questions
Diagrams

Diagrams

Visual representations for Unit 5

Physical Storage Hierarchy

Physical Storage Hierarchy
1. Primary Storage (Cache & RAM)
Fastest (< 100 ns) | Volatile (Erased on power loss) | Direct CPU Access
2. Secondary Storage (SSD & HDD)
Moderate speed (Microseconds/ms) | Non-Volatile | Stores active databases
3. Tertiary Storage (Tapes & Optical)
Slowest (Seconds) | Immense capacity | Used for long-term historical archives
Explanation
  • Main memory holds pages for current work and durable media retain the database.
  • Moving pages between levels lets the DBMS balance capacity and access time.
Detailed Notes →Quick Revision →

Physical Architecture of a Magnetic Hard Disk

Physical Architecture of a Magnetic Hard Disk
1. Spindle & Platters
Spinning magnetic discs (e.g. 7200 RPM)
➔ 2. Tracks & Sectors
Concentric rings divided into sectors
➔ 3. Read/Write Heads
Hovering nanometers above surfaces
➔ 4. Actuator Arm
Moves heads mechanically in & out
Explanation
  • Each platter surface has tracks divided into sectors.
  • A cylinder groups tracks at the same radial position on different surfaces.
Detailed Notes →Quick Revision →

Components of Total Disk Access Time

Components of Total Disk Access Time
1. Access Motion Time (Seek Time)
Time taken by the mechanical actuator arm to position the read/write head over the target track.
2. Head Activation Time
Time required by electronic circuitry to activate the specific read/write head on the target platter surface.
3. Rotational Delay (Latency)
Time spent waiting for the target sector to rotate underneath the active read/write head.
4. Data Transfer Time
Actual time spent streaming data bits off the platter surface into the disk controller's memory buffer.
Explanation
  • Seek time positions the head and rotational delay brings the sector underneath it.
  • Transfer time measures the actual reading or writing of the data.
Detailed Notes →Quick Revision →

Fixed vs. Variable Length Record Architectures

Fixed vs. Variable Length Record Architectures
Fixed-Length Records
Every record has the exact same byte size.
Simple byte offset addressing: Address = Base + (i × Record_Size).
Variable-Length Records
Records vary in size due to VARCHAR fields, repeating groups, or nullable fields.
Requires offset pointers.
Explanation
  • Fixed-length records have predictable positions and sizes.
  • Variable-length records need information about boundaries or field offsets.
Detailed Notes →Quick Revision →

Slotted-Page Block Architecture

Slotted-Page Block Architecture
Block Header
Number of slots & Free space pointer
➔ Slot Directory
[Record 1 offset, size] [Record 2 offset, size] ➔ Grows Downward ⬇
Free Space
Record Data Area
Record 2 Data | Record 1 Data ➔ Grows Upward ⬆
Explanation
  • A slot entry points to the current location of a record inside a page.
  • Moving the record within the page can leave its slot identifier stable.
Detailed Notes →Quick Revision →

Spanned vs. Unspanned Storage Schemes

Spanned vs. Unspanned Storage Schemes
Unspanned Organization
Records are NEVER allowed to cross block boundaries.
If a record doesn't fit, the remaining space is wasted (internal fragmentation).
Spanned Organization
A large record is split across two or more blocks connected by physical disk pointers.
Explanation
  • An unspanned record must fit entirely in one block.
  • A spanned record can continue into another block, reducing leftover space but complicating reads.
Detailed Notes →Quick Revision →

Characteristics of Heap File Organization

Characteristics of Heap File Organization
Advantages
Lightning fast insertions: O(1) time complexity. New records are simply dumped at the end of the file.
Disadvantages
Extremely slow searches: Requires a linear full-table scan through every single block (O(N) time complexity).
Explanation
  • Heap records occupy available space with no required key order.
  • Insertion is simple, but an unindexed search may inspect many records.
Detailed Notes →Quick Revision →

Indexed-Sequential File Architecture

Indexed-Sequential File Architecture
Search Request:
Find Roll_No = 145
➔ Index File (in RAM)
Key 100 ➔ Block 1
Key 200 ➔ Block 2
➔
Direct Jump:
Reads only Block 1 on Disk!
Explanation
  • The index directs a search to a suitable region of a sorted file.
  • Sequential access from that point also supports scanning a range of keys.
Detailed Notes →Quick Revision →

Collision Resolution Techniques

Collision Resolution Techniques
1. Open Addressing (Linear Probing)
If bucket i is full, the engine linearly scans subsequent buckets (i+1, i+2...) until an empty slot is found.
2. Separate Chaining (Overflow Chaining)
If bucket i is full, an auxiliary Overflow Bucket is allocated and linked via a physical pointer.
Explanation
  • Two keys collide when they select the same location.
  • Chaining stores linked entries while probing searches for another available position.
Detailed Notes →Quick Revision →

Extendible Hashing Architecture

Extendible Hashing Architecture
Global Depth (d)
Number of bits used by Directory
➔ Directory Array (in RAM)
Pointers [00, 01, 10, 11] ➔
Data Buckets (on Disk)
Each bucket has a Local Depth (d')
Explanation
  • A prefix of the hash value selects an entry in a directory.
  • A full bucket can split, and sometimes the directory must grow as well.
Detailed Notes →Quick Revision →