Set 3-1 Flashcards

(29 cards)

1
Q

Used to store petabytes of user data in cloud

A

Magnetic Disk

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

Reading one gigabyte takes about one second

A

Flash Memory

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

Upgrading from 16 to 32 gigabytes costs an extra 400 for an Apple laptop computer

A

Main Memory

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

Approx how many sectors are required to store one megabyte of data?

A

Either 250 or 2000 sectors

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

The database administrator specifies an eight-kilobyte block size. Flash memory page size is two kilobytes. A user runs a query that reads two pages of flash memory. How many blocks are transferred to main memory?

A

One

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

A database uses 16-kilobyte blocks. A table contains 18,200 rows of 100 bytes each. Ignoring space used by the system for overhead, how many bytes are unused on each block? Assume one kilobyte = 1,024 bytes

A

84

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

4-megabyte photographs are usually stored ____.

A

separate from other columns, managed either within the database or by the file system

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

What are some examples of DBs that support column oriented storage?

A

PostgreSQL and Vertica

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

Assume column-oriented storage. Roughly how many blocks are required to compute average income by postal code for all people?

A

3250 blocks

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

Assume row-oriented storage, with each row containing Name, Income, and PostalCode only. Roughly how many blocks are required to compute average income by postal code for all people?

A

8264 blocks

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

The term ‘column-oriented’ ____.

A

Means either a technique for organizing data on storage media or a type of NoSQL database

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

A DB supports which four table structures

A

Heap, Sorted, Hash, Table Cluster

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

Assume 100 rows fit in each block of a sorted table. If a block is full and an insert causes the block to split, roughly what percentage of the new and old blocks is empty?

A

50%

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

A database designer creates a new Employee table with primary key ‘EmployeeNumber’, loads 1 million rows into the table, then runs many queries that join other tables on the EmployeeNumber column. What is the best structure for Employee?

A

Heap table initially, then restructure to sorted table after bulk load is complete

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

Sorted tables are always sorted on a single column. T/F

A

False

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

Assume blocks are 8 kilobytes, rows are 200 bytes, and the hash function is modulo 13. If each bucket initially has one block, how many rows fit into a single bucket?

17
Q

Assume blocks are 8 kilobytes, rows are 200 bytes, and the hash function is modulo 13.
In a best-case scenario, what is the maximum number of row inserts before some bucket overflows?

18
Q

Assume blocks are 8 kilobytes, rows are 200 bytes, and the hash function is modulo 13. 1,000,000 rows are inserted. In a worst-case scenario, what is the maximum number of blocks chained together in a single bucket?

19
Q

What happens when a new row is inserted into a full bucket?

A

A new block is linked to the initial block, and the new row is stored in the new block.

20
Q

The cluster key is normally the primary key of both tables in a cluster. T/F

21
Q

Table clusters are the most commonly used physical structure for tables. T/F

22
Q

Cluster keys in a table cluster are similar to sort columns in a sorted table. T/F

23
Q

Table clusters always contain exactly two tables. T/F

24
Q

How many tables can be stored in one tablespace?

A

At least zero, at most many

25
The Airport table has two thousand rows. The Airline table has ten thousand rows. Both tables are updated infrequently. Should Airport and Airline be stored on the same Tablespace
Sometimes
26
The Booking table has ten million rows and is updated frequently. The Airline table has ten thousand rows and is updated infrequently. Should Booking and Airline be stored in the same tablespace?
Never
27
How many partitions can one table have?
At least zero, at most many
28
The Airport table has two thousand rows and is updated infrequently. Should Airport be partitioned?
Never
29
The Reservation table has one hundred million rows and is updated frequently. Most queries access recent bookings. Should Reservation be partitioned?
Yes, Reservation should be partitioned on the ReservationDate column