CS 430 Chapter 10 & 11
1. The disk platters are mounted on a ______________. 2. The surface of a disk is logically divided into concentric ______________s. 3. The ith tracks of all the platters together are called the ith ______________. 4. A ______________ is the smallest unit of information that can be read from or written to the disk. 5. The read-write heads of all the tracks are mounted on a single assembly called a disk ______________. 6. Each disk ______________ has a flat circular shape. 7. The ______________ stores information on a sector magnetically, and there is one for each side of each platter of a disk. 8. The ______________s are kept as close as possible to the disk surface to increase the recording density. a) platter b) sector c) spindle d) arm e) read-write head f) cylinder g) track
1) NOT g) track a) platter 2. g) track 3. f) cylinder 4. b) sector 5. d) arm 6. a) platter 7. e) read-write head 8.NOT track
Match the steps to insert a data entry into a B+ tree to their order: 1. 2. 3. 4. 5. a) If necessary, split the node recursively b) Insert index entry pointing to L2 into parent of L c) If room in L, put data entry into L; done. d) Find the correct leaf L. e) split L, redistribute entries evenly, copy up middle key
1. NOT d) Find the correct leaf L. 2. 3. 4. 5. c) If room in L, put data entry into L; done.
Match the elements below to their position in the storage-device hierarchy, according to their cost. 1. 2. 3. 4. 5. 6. a) cache b) flash memory c) optical disk d) magnetic tapes e) main memory f) magnetic disk
1. a) cache 2. e) main memory 3. b) flash memory 4. c) optical disk 5. f) magnetic tapes MAYBE 6. d) magnetic disk MAYBE
Match the elements below to their position in the storage-device hierarchy, according to their speed. 1. fastest 2. 3. 4. 5. slowest elements: a) magnetic tapes b) cache c) flash memory d) disk e) main memory
1. b) cache 2. e) main memory 3. c) flash memory 4. d) disk 5. a) magnetic tapes
Match the disk movement term to its appropriate description. 1. Seek time 2. Rotational delay 3. Transfer time a) Time to move the data to/from the surface b) Time for the block to rotate under the head c) Moving arms to position the disk head on track
1. c) Moving arms to position the disk head on track 2. b) Time for the block to rotate under the head 3. a) Time to move the data to/from the surface
Match the operation while deleting a data entry from a B+ tree to its order of sequence. 1. 2. 3. 4. 5. Operations: a) Recursively merge index nodes where necessary. b) Remove entry, replace index if necessary. c) If L falls below D, and redistribution fails, merge with sibling d) If L falls below D, try to redistribute. e) Find Leaf L where entry exists.
1. e) Find Leaf L where entry exists. 2. b) Remove entry, replace index if necessary. 3. d) If L falls below D, try to redistribute. 4. c) If L falls below D, and redistribution fails, merge with sibling 5. a) Recursively merge index nodes where necessary.
1. An indexing technique based on a uniform distribution of values across a range of buckets. 2. The time it takes for a particular hashing or indexing technique to delete a data item. 3. Any attribute or set of attributes with which a file may locate a record or set of records. 4. When some hash buckets are assigned more records than are others, and a bucket may overflow even as other buckets still have space, it is called ________________. 5. The time it takes for a particular hashing or indexing technique to find a particular data item, or set of items. 6. The time it takes for a particular hashing or indexing technique to insert a new data item. 7. An indexing technique based on a sorted ordering of the values. a) Deletion time b) Access time c) Insertion time d) Space overhead e) Ordered index f) Hash index g) Secondary index h) Access type i) Search key j) Skew
1. f) Hash index 2. a) Deletion time 3. i) Search key 4. j) Skew 5. b) Access time 6. c) Insertion time 7. e) Ordered index
A primary index is one that includes the primary key, indexes that include only other candidate keys are called secondary indexes.
False
If we are inserting a data entry into a bucket in a static hashing table and there is no space in the bucket, we split the bucket and put the entry into the new bucket.
False
Relational schemas and other metadata about relations are stored in a structure called system cache.
False
The ability to double the directory by simply copying the directory to the lower part is accomplished because we are using the most significant bits.
False
The main advantage to a static hashing schemes is that the number of buckets is variable and memory allocation becomes simplified.
False
The average number of children in a B+ tree is called what? a) The height of the tree. b) The fan-out of the tree. c) The depth of the tree. d) The significance of the tree. e) The order of the tree.
NOT a) The height of the tree. e) The order of the tree.
Which of the following are true about B+ tree index files? a) Insert / delete at logFN cost where F = fanout and N = # leaf pages. b) Each node contains exactly 2d entries. d is called the order of the tree. c) Each node contains d d) B+ tree is the most widely used index. e) Maximum 50% occupancy (except for root).
NOT b) Each node contains exactly 2d entries. d is called the order of the tree.
Which of the following are NOT part of the metadata stored in a system catalog? a) Index size. b) Index structure. c) Index height. d) Index values. e) Index name.
NOT b) Index structure.
Both the global and the local depth use the value to identify which of the following? a) The value to be given to the hash function. b) The degree of difficuty required by the hash function. c) The number of iterations the hash function is to run. d) The number of bits of the value returned from the hash table to use.
NOT c)
The primary difference between a B tree indices and a B+ tree indices is which of the following? a) A B-tree eliminates the redundant storage of primary keys. b) A B-tree eliminates primary keys. c) A B+-tree eliminates the redundant storage of search-key values. d) A B+-tree eliminates the redundant storage of primary keys. e) A B-tree eliminates the redundant storage of search-key values.
NOT c) A B+-tree eliminates the redundant storage of search-key values.
Which of the following are techniques used by the buffer manager to address all the disk blocks? a) Buffer replacement strategy. b) Forced output of blocks. c) Disk striping. d) Disk mirroring. e) Pinned blocks.
NOT c) Disk striping.
Which buffer replacement policy is optimal for a database system in all scenarios? a) It depends - no one strategy is always optimal. b) Toss Immediately (TI) c) Least Recently Used (LRU) d) Most Recently Used (MRU)
NOT c) Least Recently Used (LRU)
Because all the pages cannot be brought into memory at the same time, the DBMS must bring pages into main memory as they are needed and, in the process, decide what existing page in main memory to replace to make room for the new page. Which architecture layer of a DBMS is responsible for determining which page to replace? a) Buffer manager b) Disk manager c) Page manager d) Transaction manager e) File and Access manager
NOT c) Page manager
In an extendible hashing scheme, the directory structure is grown when which of the following is true? a) The size of the global depth indicator exceeds the local indicator after the insert. b) The size of the global depth indicator exceeds the local indicator before the insert. c) The size of the local depth indicator exceeds the global indicator before the insert. d) The size of the local depth indicatory exceeds the global indicator after the insert.
NOT a) b) The size of the global depth indicator exceeds the local indicator before the insert.
Static hashing is done by performing which of the following? a) Applying the hash function to the data record and using it to find the record. b) Using the pointer obtained from the search key to identify the data page which is then hashed. c) Applying a hash function h to identify the directory entry then following the chain of buckets to the correct one. d) Using the pointer obtained from the search key and applying the hashing function to the pointer. e) Applying a hash function h to the search key to identify the bucket to which it belongs and then searching this bucket.
NOT b) d) c) Applying a hash function h to identify the directory entry then following the chain of buckets to the correct one.
Match the RAID level with its appropriate description. 1) RAID 0 2) RAID 1 3) RAID 1+0 4) RAID 5 Descriptions: a) Improves performance by string the files across multiple drives. No pairity. b) Provides redundancy by mirroring each of the drives. c) Allows a single drive to fail without data loss by providing block level pairity. Does not provide P + Q redundancy. d) Provides a striped set from a set of mirrored drives.
REDO RAID 0: a) Improves performance by string the files across multiple drives. No pairity. RAID 1: NOT c) Allows a single drive to fail without data loss by providing block level pairity. Does not provide P + Q redundancy. RAID 1+0: NOT b) Provides redundancy by mirroring each of the drives. RAID 5: NOT d) Provides a striped set from a set of mirrored drives.
A file is a collection of pages each containing a collection of records. Support must include inserts, deletes, modifies, and reads among other operations.
True
A range search is the concept of finding all records where the seach key value is less than some value and/or greater than another value.
True
In a page format that consists of packed fixed length records, free space is contiguous. In a page format that consists of unpacked fixed length records, free space can be non-contiguous.
True
One of the problems with a static hashing scheme is that long overflow chains develop.
True
The buffer manager is responsible for bringing a page into RAM, and the page cannot be removed from RAM until released by the requestor(s).
True
When using a heap file organization, any record can be placed anywhere in the file where there is space for the record.
True
How many disk heads are there in a disk drive that has 4 double-sided platters, 200 cylinders, and 2000 tracks? a) 8 b) 4 c) 1 d) 16 e) 10
a) 8
Under what circumstances must a database index be updated? a) A record is inserted into a databse. b) A record is deleted from the database. c) A security key is added to the database. d) A record is updated in the database.
a) A record is inserted into a databse. b) A record is deleted from the database.
Which of the following best describes the advantage of hashing over a tree structure for indexing ? a) Storing indexes in hash structures could result in better range searches. b) Storing indexes in hash structures could result in smaller keys. c) Storing indexes in hash structure could result in less fanout to the tree. d) Storing indexes in hash structures could result in less depth to the tree. e) Storing indexes in hash structures could result in less disk I/Os.
a) Storing indexes in hash structures could result in better range searches.
For a set of 100 data records with 5 fields per record, how many clustered indexes can there be? a) 5 b) 1 c) 100 d) 500
b) 1
Which of the following are factors to be taken into account when choosing a RAID level? a) Improvement of MTBF of a disk unit. b) Performance during a disk rebuild c) Performance when a disk has failed. d) Monetary cost of extra disk-storage requirements. e) Performance requirements in terms of number of I/O operations.
b) Performance during a disk rebuild c) Performance when a disk has failed. e) Performance requirements in terms of number of I/O operations. d) Monetary cost of extra disk-storage requirements.
Which of the following about a database table are stored in the system catalog? a) The name of the table b) The file structure for the table c) Attribute name and type for each attribute in the table d) The integrity constraints on the table e) The JDBC connector information
b) The file structure for the table AND a) The name of the table AND AND
The policy that is used to choose and unpinned page to be swapped out is called what? a) The timing policy, such as SCAN and CSCAN. b) The replacement policy, such as LRU and clock. c) The swap policy used for thrashing. d) The buffer policy, such as free behind and look ahead. e) The write policy, used for write-ahead logging.
b) The replacement policy, such as LRU and clock.
A B+ tree index takes the form of a _______ tree in which every path from the root of the tree to a leaf of the tree is of the same length.
balanced
When a file is organized so that the ordering of data records is the same as or close to the ordering of data entries in some index, we say that is: a) A primary index. b) A typed index. c) A clustered index. d) A secondary index. e) A sorted index.
c) A clustered index.
Which of the following is true about primary and secondary indexes? a) A primary index is the main index field of an index file, a secondary index is all other fields in the index file. b) A primary index is one that contains file pointers, a secondary index describes all other file pointers. c) A primary index is one that does not allow duplicates, a secondary index is one that does. d) A primary index is one that contains the primary key, a secondary index contains additional fields as well as the primary key. e) A primary index is the main index field of an index file, a secondary index is the rid pointing to the actual record.
c) A primary index is one that does not allow duplicates, a secondary index is one that does.
Which of the following best describes the 2 parts of the representation of a record with variable-length attributes? a) Initial part with fixed length attributes b) Data describing the fixed length attributes c) Data for variable length attributes d) Array of records, each pointing to an offset.
c) Data for variable length attributes AND
Which of the following are methods to improve reliability? a) Striping. b) Mirroring. c) Redundancy. d) Redundant arrays of independent disks (RAID). e) Improving MTBF.
c) Redundancy. 1/4 NOT a) c)
The unit of transfer betweeen disk and main memory is which of the following? a) A platter b) A sector c) A track d) A set of sectors e) A cylinder
d) A set of sectors
The key advantage of using a B+ tree for an index file as opposed to a hashing scheme is which of the following? a) Ascending keys b) Duplicate keys c) Descending keys d) Equality searches e) Range searches
e) Range searches