{ "@context": "https://schema.org", "@type": "Organization", "name": "Brainscape", "url": "https://www.brainscape.com/", "logo": "https://www.brainscape.com/pks/images/cms/public-views/shared/Brainscape-logo-c4e172b280b4616f7fda.svg", "sameAs": [ "https://www.facebook.com/Brainscape", "https://x.com/brainscape", "https://www.linkedin.com/company/brainscape", "https://www.instagram.com/brainscape/", "https://www.tiktok.com/@brainscapeu", "https://www.pinterest.com/brainscape/", "https://www.youtube.com/@BrainscapeNY" ], "contactPoint": { "@type": "ContactPoint", "telephone": "(929) 334-4005", "contactType": "customer service", "availableLanguage": ["English"] }, "founder": { "@type": "Person", "name": "Andrew Cohen" }, "description": "Brainscape’s spaced repetition system is proven to DOUBLE learning results! Find, make, and study flashcards online or in our mobile app. Serious learners only.", "address": { "@type": "PostalAddress", "streetAddress": "159 W 25th St, Ste 517", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10001", "addressCountry": "USA" } }

Lecture 5 Flashcards

(10 cards)

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