Storage and Indexing Flashcards

1
Q

Each table is stored on disk in a ____ __ _____

A

file of records

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

A record is a memory area logically divided in _____

A

fields

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

What 3 things does a record display?

A
  • Corresponds to a row of values in the table
  • Each has the same number of fields (but maybe not the same length)
  • Each has a unique identifer (rid)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What 4 operations of file of records support?

A

Insertion (of records)
Deletion (of records)
Modification (of records)
Scan (of records)

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

Files of records are organized in _____

A

pages

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

A page is a unit of information _____ ____ or ______ __ disk

A

read from, written to

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

This section focusses on how file of records can be organized as a _______ of pages

A

collection

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

The simplest file organization structure is a _____ file

A

heap

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

In a heap file, records are stored in ______ order across pages and are retrieved by ___

A

random, rid

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

We implements heap files with a ______ ____ of pages or ______ of pages

A

linked list, directory

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

Heap files implemented with linked lists keep 2 linked lists: one with _____ pages and another with _____ pages

A

free, full

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

What are 2 disadvantages of the heap file implemented with linked lists?

A
  1. Free list pages are of variable length.

2. Must scan several pages to insert a record

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

In a heap file implemented with a directory, each directory points to a ____ page

A

data

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

In a heap file implemented with a directory, what are 2 was free space can be managed?

A
  1. a bit per entry

2. count amount of free space per entry

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

A page is a ________ of slots

A

collection

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

The format of a page depends on the type of _______ and support for ____ operations

A

record, CRUD

17
Q

In packed pages with fixed-length records, records are stored in the first _ slots

A

n

18
Q

in unpacked pages with fixed-length records, a ____ _____ tells which slots are free for records

A

bit array

19
Q

In pages with variable-length records, the page is filled with _______ that point to a record and stores the ____ of the record

A

pointers, size

20
Q

Pages with variable length records are also called a _______ __ ______

A

directory of slots

21
Q

In directory of slots, records can be moved without changing ___

A

rid

22
Q

____ length records give direct access to fields, but are inefficiently stored

A

fixed

23
Q

What are two formats for variable length records?

A
  • Fields delimited by special symbol

- Array of fields offset

24
Q

What is an index?

A

a data structure that organizes data records on a disk based on search key

25
Q

A _____ ______ is a record stored in an index file

A

data entry

26
Q

Indexs allow _______ retrieval of all data records satisfying a condition on the _____ ___

A

efficient, search key

27
Q

What are 3 ways to store a data entry in an index with search key value k?

A
  1. A data entry k*
  2. (k, rid)
  3. (k, rid-list)
28
Q

What are the 2 main indexing strategies?

A
  • Hashing

- Trees

29
Q

In tree-based indexing, fan-out is the average number of ________

A

children

30
Q

In tree-based indexing, the number of disk I/O needed to find a record is…

A

length of path to a leaf + number of leaf pages with qualifying data entries