DataStorage Flashcards

1
Q

What is a database page (block)?

A

A fixed-size block of data that serves as the fundamental unit of data storage and transfer in a DBMS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the typical size range of database pages?

A

512 bytes to 32 kilobytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the three key rules for database pages?

A

1) Pages contain only one type of data 2) A record cannot span multiple pages 3) No record is larger than a page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are fixed-length records?

A

Records where all fields have a predefined fixed size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the main advantage of fixed-length records?

A

Simplicity in record access and management

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the two main problems with fixed-length records?

A

1) Records may cross block boundaries 2) Difficult to delete records

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a slotted page header?

A

A header containing number of record entries end of free space and location/size of each record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the two components of variable-length record storage?

A

1) Initial part with fixed-length information 2) Contents of variable-length attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How are variable-length attributes represented?

A

Using a pair (offset length) where offset shows where data begins and length shows size in bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a null-value bitmap?

A

A bitmap that indicates which attributes have NULL values in a record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the two main solutions for storing Large Objects (LOBs)?

A

1) Segmentation (breaking into smaller pieces) 2) File System Storage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is heap file organization?

A

Records are placed anywhere in the file where space is available

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is sequential file organization?

A

Records are stored in sequential order based on a search key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is multitable clustering file organization?

A

Records from multiple related tables are stored in the same file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a free-space map?

A

Array with one entry per block indicating the fraction of block that is free

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why is writing free-space map to disk periodically better than immediately?

A

Writing immediately for every update would be very expensive

17
Q

What are the five main types of file organization?

A

Heap Sequential B+-tree Hashing Multitable clustering

18
Q

What is table partitioning?

A

Dividing records into smaller relations typically based on attribute values

19
Q

What is the data dictionary?

A

System catalog that stores metadata about the database

20
Q

What are the main components of a database buffer system?

A

Buffer (portion of main memory) and Buffer manager (subsystem for allocation)

21
Q

What is a pinned block?

A

A block that cannot be evicted from buffer because it’s being read by a process

22
Q

What is the difference between S and X locks?

A

S (shared) locks for reading X (exclusive) locks for updating only one process can get X lock

23
Q

What is LRU replacement policy?

A

Removes the block that hasn’t been accessed for the longest time

24
Q

What is MRU replacement policy?

A

Removes the most recently used block

25
What is toss-immediate strategy?
Frees block space as soon as final tuple is processed
26
What is column-oriented storage?
Storage method where each column is stored separately instead of storing rows together
27
What are the main benefits of column-oriented storage?
Reduced I/O better compression improved CPU cache performance vector processing
28
What are the main drawbacks of column-oriented storage?
Costly tuple reconstruction complex updates decompression overhead
29
What type of workload is column-oriented storage best suited for?
OLAP (Online Analytical Processing) workloads
30
What is the pin count used for in buffer management?
Tracks multiple concurrent pinning operations to prevent premature block eviction
31
Why don't databases rely on OS for memory management?
OS uses FIFO policy which isn't efficient for data-processing systems that know their workflow