Lecture 2 Flashcards

1
Q

What is the difference between non-volatile memory and volatile.

A

Volatile memory keeps data after the device has shutdown, whilst non-volatile memory looses the data

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

Is data directly accessed on disks?

A

No, data is accessed through RAM. RAM gets data from main memory.

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

What system allows DBMS to interact with both Hard disks and SSD’s

A

File System

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

Does in-memory DMBS use the same architecture as traditional DMBS?

A

No.

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

Identify the difference between Platters, Tracks, Blocks and Sectors.

A

Platter: Disk.
Tracks: ring within a disk.
Sector: A part of a Track.
Block: The unit that describes the data between RAM and hard disk

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

What is data striping and which RAID level uses it?

A

Data striping: Same data, store it on multiple smaller disks, increasing speed. RAID 0

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

What is data Mirroring and which RAID level uses it?

A

Data mirroring: storing copies of the data on multiple, same sized, disks. RAID 1

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

What is RAID 0 + 1?

A

Striping + Mirroring

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

What does RAID level 2 do?

A

Computes and stores data in separate disks that help in error detection and recovery

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

What does a disk space manager do?

A

Manages space on the disk, attempting to store pages on subsequent blocks. Lowest Level of Software. Hides details of underlying software.

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

How does the Disk Space Manager use page ids with allocating and deallocating?

A

When allocating, the DSM will assign a free block to a page ID.
When deallocating, the DSM will use the page ID to deallocate the block

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

What are the 2 ways Disk Space Managers keep track of free blocks? Which one is generally better?

A

Linked List and Bitmap. Bitmap is better because you can easily track continuous sequences of free blocks

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

What does the buffer manager do?

A

Responsible for bringing pages from disk to main memory.

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

Define the following terms: Buffer Pool, Frame, Pin Count, Dirty Bit

A

Buffer Pool: the partition of main memory into frames
Frame: A slot in the buffer pool that holds a disk block
Pin Count: Number of users using a frame
Dirty Bit: If the page brought to main memory has been modified or not.

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

For buffer manager, if the page is in the pool, what do you do?

A

Increment frames pin count and return frame address

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

For buffer manager, what do you do if the page is NOT in the pool.

A

Find a frame with a pin count of 0.

If dirty bit is on, write whatever is currently on the page to main memory, turn dirty bit off,

Finally, read and load the page into the selected frame, and return frame address.

17
Q

What are the 4 buffer replacement policies?

A

Least recently used (LRU)
First in First out (FIFO)
Most Recently Used (MRU)
Random

18
Q

What is a DB File?

A

A collection of pages, containing records from a DB. Provides a way to logical organize records

19
Q

What operations are supported in heap files?

A

Create/Destroy files
insert/delete/get records with Id
Scan all records

20
Q

What are the 2 Page layouts to store fixed-length records? How do they handle deletions?

A

Packed: Store the number of records at the very end. When a record is deleted, move the last record into the now free slot.

Bitmap (unpacked): In last row, store bits representing if the slot is free or not (0 = free, 1 = taken). When we delete, set corresponding bit to 0. (see textbook page 328).