DBMS Storage & Indexing

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/34

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

35 Terms

1
New cards

Storage Hierarchy (Fastest to Slowest)

Main Memory > Flash Memory > Magnetic Disk > Tape

2
New cards

Heap File

Records are stored in any order

3
New cards

Sorted File

Records are stored sorted by a search key

4
New cards

Hashed File

Hash function determines record placement

5
New cards

Fixed-Length Record

All fields are the same size

6
New cards

Variable-Length Record

Fields differ in size; offsets used for access

7
New cards

Page (in DBMS)

Unit of data transfer between disk and memory

8
New cards

Blocking Factor

Number of records per page = floor(page size / record size)

9
New cards

Buffer Pool

Caches pages in memory for quick access

10
New cards

Common Buffer Replacement Policies

LRU, Clock, MRU

11
New cards

Index

Data structure for fast lookup on search key

12
New cards

Primary Index

Index on primary key (unique)

13
New cards

Secondary Index

Index on non-primary or non-unique attributes

14
New cards

Index Alternative 1

Data entry stores full record

15
New cards

Index Alternative 2

Data entry stores pointer (RID) to record

16
New cards

Index Alternative 3

Data entry stores key + list of RIDs (for duplicates)

17
New cards

Clustering Index

Data file is physically ordered by the index key

18
New cards

Unclustered Index

Data file order does not match index key order

19
New cards

Dense Index

Has one entry per data record

20
New cards

Sparse Index

Has one entry per page (only works with sorted data files)

21
New cards

B+ Tree Index

Multi-level balanced tree; leaf nodes store all data entries

22
New cards

B+ Tree Leaf Nodes

Contain actual data entries and are linked for range scans

23
New cards

B+ Tree Internal Nodes

Contain only keys and child pointers

24
New cards

Hash Index

Uses a hash function to map keys to buckets

25
New cards

Hash Index Use Case

Only supports equality search, not range queries

26
New cards

Extendible Hashing

Hash index with a directory that grows and shrinks

27
New cards

Linear Hashing

Hash index without directory; grows gradually

28
New cards

Seek Time

Time to move disk arm to correct track

29
New cards

Rotational Delay

Time for desired sector to rotate under read head

30
New cards

Transfer Time

Time to actually read/write the data

31
New cards

Index Usage for Equality Queries

Hash or B+ Tree

32
New cards

Index Usage for Range Queries

B+ Tree only

33
New cards

Best Index for Sorting

Clustered B+ Tree

34
New cards

Best Index for Heavy Inserts

Hash Index

35
New cards