Lecture 5 Flashcards

1
Q

What is a system catalog?

A

Contains metadata describing data the DMBS handles, stored in tables called catalog tables. Also called data dictonary.

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

What does the system catalog store for system wide information?

A

Size of buffer pool and size of a page

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

What does the system catalog store for a table?

A

Tables name and related files
Attributes and types of the table
tables index names
integrity constraints (key and foreign key)

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

What does the system catalog store for an index?

A

Index name and type
Search key attribute

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

What does the system catalog store for a view?

A

View name and definition

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

What does the system catalog store for statistics about tables and index?

A

-Number of tuples in table R
-Number of pages for R
-Number of distinct key values
- Number of pages for index I (leafs)
- Number of non-leaf levels
- Index Range

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

What are the advantages of storing catalogs as tables?

A

Catalog tables can be queries and we can use the techniques to manage tables for catalog tables

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

Why is sorting important for DMBS?

A
  1. returning answers in some order is easier
  2. Bulk loading
  3. Eliminating duplicate copies from a select is easier
  4. Join operation is easier
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why do we need external sorting?

A

We can’t use sort algorithms in databases, and most DB’s are too large to fit on main memory

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

In Two-Way Merge Sort, what is the number of passes, and what is the overall cost?

A

Where N is the number of pages:
- Passes: log2(N) + 1
- Cost: 2N(log2(N) + 1)

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