Week-2 - Major Storage Layouts Flashcards

1
Q

List the 5 layers of computer memory

A

1) CPU - Registers
2) L1 Cache
3) L2 Cache
4) Main Memory
5) Hard Disk - secondary storage

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

Why is the processing speed of a traditional computer hard disk lower than a modern solid state drive (SSD)?

1) Because a hard disk can only read pages in sequence.
2) Because solid state drive is a mechanical device.
3) Because the size of a solid state drive is bigger than that of a hard disk.
4) Because hard disk is a mechanical device.

A

4) Because hard disk is a mechanical device.

Contrary to solid state drives, a hard disk has to spin and spend

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

DB data is stored as a file organized as a?

A

A set of Page(s) on the Hard Disk

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

DB File Organization

A

Method of arranging a file of records on external storage organized by Record ID (rid) like a primary ID

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

What is a Buffer Manager

A

The buffer manager is a software component that loads
the pages from disk into the main memory of the computer system, so that the database system can process this information.

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

Why did we use Buffers

A

you cannot load everything into the main memory at once,

you load it just a bit page by page

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

The file and index layer makes call to?

A

Buffer Manager to ask for data to be retrieved form the Hard Disk

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

Heap Files System

A

A heap file is an unordered set of records, stored on a set of pages. This class provides basic support for inserting, selecting, updating, and deleting records. Temporary heap files are used for external sorting and in other relational operators.

Easy insert of data (append)

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

Sorted File System

A

Sorted File Method –In this method, As the name itself suggest whenever a new record has to be inserted, it is always inserted in a sorted (ascending or descending) manner. Sorting of records may be based on any primary key or any other key.

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

Indexes File System

A

Data structure to organize records via a trees or hashing

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

Heap Files use what data structure

A

Linked List with Pointers

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

Best cost measure of accessing a file

A

Number page accesses (using I/O costs)

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

Three Advantages of a heap file

A

Efficient

1) Bulk load data
2) Small relations/tables don’t need overhead of indexing
3) Good for queries fetching large proportion of stored records

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

Two Disadvantages of heap file

A

Not Efficient

1) for selective queries
2) for storing

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

Benefits of Indexes

A

1) Fast Queries

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

Which of the following file organizations must be used if one needs to retrieve all records in random order?

1) Scanned files
2) Heap files
3) Indexes
4) Sorted files

A

2) Heap files

Heap files are in random order.

17
Q

Indexes use what data structure

A

B+ Tree

18
Q

If you wanted to search by Age what you use as the index key

A

Age

19
Q

Where is database stored in a computer?

1) Memory
2) Central Processing Unit
3) Cache
4) Hard disk

A

4) Hard disk

20
Q

What is the correct order of processing speed of major units in a computer from the fastest to slowest?

1) Cache, CPU, memory, hard disk
2) CPU, cache, memory, hard disk
3) Hard disk, memory, cache, CPU
4) CPU, memory, cache, hard disk

A

2) CPU, cache, memory, hard disk

21
Q

Why is the processing speed of a traditional computer hard disk lower than a modern solid state drive (SSD)?

1) Because the size of a solid state drive is bigger than that of a hard disk.
2) Because solid state drive is a mechanical device.
3) Because hard disk is a mechanical device.
4) Because a hard disk can only read pages in sequence.

A

3) Because hard disk is a mechanical device.

22
Q

What is the name of the software component in a computer that loads pages from hard disk in to memory?

1) Load manager
2) Memory manager
3) Index manager
4) Buffer manager

A

4) Buffer manager