Set 3-1 Flashcards
(29 cards)
Used to store petabytes of user data in cloud
Magnetic Disk
Reading one gigabyte takes about one second
Flash Memory
Upgrading from 16 to 32 gigabytes costs an extra 400 for an Apple laptop computer
Main Memory
Approx how many sectors are required to store one megabyte of data?
Either 250 or 2000 sectors
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?
One
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
84
4-megabyte photographs are usually stored ____.
separate from other columns, managed either within the database or by the file system
What are some examples of DBs that support column oriented storage?
PostgreSQL and Vertica
Assume column-oriented storage. Roughly how many blocks are required to compute average income by postal code for all people?
3250 blocks
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?
8264 blocks
The term ‘column-oriented’ ____.
Means either a technique for organizing data on storage media or a type of NoSQL database
A DB supports which four table structures
Heap, Sorted, Hash, Table Cluster
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?
50%
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?
Heap table initially, then restructure to sorted table after bulk load is complete
Sorted tables are always sorted on a single column. T/F
False
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?
40
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?
520
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?
25,000
What happens when a new row is inserted into a full bucket?
A new block is linked to the initial block, and the new row is stored in the new block.
The cluster key is normally the primary key of both tables in a cluster. T/F
False
Table clusters are the most commonly used physical structure for tables. T/F
False
Cluster keys in a table cluster are similar to sort columns in a sorted table. T/F
True
Table clusters always contain exactly two tables. T/F
False
How many tables can be stored in one tablespace?
At least zero, at most many