Summer CS 430 Practice Quiz: Chapter 10 & 11

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Match the type of data storage to its definition. 1. Cache 2. Main memory 3. Magnetic-disk storage 4. Tape Storage Definitions: a) The fastest and most costly form of storage. b) The storage medium used for data that is available to be operated on. c) Used primarily as a backup storage medium. d) The primary medium for long-term on-line storage of data. e) Similar to main memory, but survives a power failure.

1. Cache a) The fastest and most costly form of storage. 2. Main memory b) The storage medium used for data that is available to be operated on. 3. Magnetic-disk storage d) The primary medium for long-term on-line storage of data. 4. Tape Storage c) Used primarily as a backup storage medium.

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 MAYBE 5. f) magnetic tapes MAYBE 6. d) magnetic disk NOT

1. The time it takes for a particular hashing or indexing technique to find a particular data item, or set of items. 2. Any attribute or set of attributes with which a file may locate a record or set of records. 3. The time it takes for a particular hashing or indexing technique to delete a data item. 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. An indexing technique based on a uniform distribution of values across a range of buckets. 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. 8. The additional space occupied by an index structure for a particular hashing or indexing technique. 9. A type of dense index, with an index entry for every search-key value and a pointer to every record in the file, where the records pointed to by successive values in the index are not stored sequentially. Terms: 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. b) Access time 2. i) Search key 3. a) Deletion time 4. j) Skew 5. f) Hash index 6. c) Insertion time 7. e) Ordered index 8. d) Space overhead 9. g) Secondary index

Match the operation while deleting a data entry from a B+ tree to its order of sequence. 1. 2. 3. 4. 5. a) Recursively merge index nodes where necessary. b) Find leaf L where entry exists. c) Remove entry, replace index if necessary. d) If L falls below d, try to redistribute. e) If L falls below d and redistribution fails, merge L with sibling.

1. b) Find leaf L where entry exists. 2. c) Remove entry, replace index if necessary. 3. d) If L falls below d, try to redistribute. 4. e) If L falls below d and redistribution fails, merge L with sibling. 5. a) Recursively merge index nodes where necessary.

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 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. d) Find the correct leaf L. 2. e) split L, redistribute entries evenly, copy up middle key 3. b) Insert index entry pointing to L2 into parent of L 4. a) If necessary, split the node recursively 5. c) If room in L, put data entry into L; done.

1. The ______________s are kept as close as possible to the disk surface to increase the recording density. 2. The surface of a disk is logically divided into concentric ______________s. 3. A ______________ is the smallest unit of information that can be read from or written to the disk. 4. Each disk ______________ has a flat circular shape. 5. The ______________ stores information on a sector magnetically, and there is one for each side of each platter of a disk. 6. The read-write heads of all the tracks are mounted on a single assembly called a disk ______________. 7. The ith tracks of all the platters together are called the ith ______________. 8. The disk platters are mounted on a ______________. Terms: a) platter b) sector c) spindle d) arm e) read-write head f) cylinder g) track

1. e) read-write head 2. g) track 3. b) sector 4. a) platter 5. e) read-write head 6. d) arm 7. f) cylinder 8. c) spindle

A primary index is one that includes the primary key, indexes that include only other candidate keys are called secondary indexes.

False

A search key is the same as a candidate key.

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

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.

NOT a) Storing indexes in hash structures could result in better range searches. d) Storing indexes in hash structures could result in less depth to the tree. c) Storing indexes in hash structure could result in less fanout to 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. a) Index size. c) Index height.

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 d) A B+-tree eliminates the redundant storage of primary keys. c) A B+-tree eliminates the redundant storage of search-key values. a) A B-tree eliminates the redundant storage of primary keys.

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 1. a) Improves performance by string the files across multiple drives. No pairity. 2. b) Provides redundancy by mirroring each of the drives. 3. d) Provides a striped set from a set of mirrored drives. 4. c) Allows a single drive to fail without data loss by providing block level pairity. Does not provide P + Q redundancy.

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

Dynamic hashing techniques allow the hash function to be modified dynamically to accommodate the growth or shrinkage of the database.

True

For each view, the system catalog stores the view name and the definition of the view.

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

System catalogs are stored as as a collection of tables.

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.

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

a) Buffer manager

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).

a) Insert / delete at logf(N) cost where F = fanout and N = # leaf pages. d) B+ tree is the most widely used index. c) Each node contains d

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)

a) It depends - no one strategy is always optimal.

The two most common tertiary storage media are: a) Magnetic tapes b) Main memory c) Magnetic disks d) Optical disks e)Flash memory

a) Magnetic tapes

Which of the following is true about tree-structured indexing techniques? a) Not good for equality searches or range searches. b) Support both range searches and equality searches. c) Supports range searches but not equality searches. d) Supports equality searches but not range searches. e) Good for sliding window searches, not for equality or range.

a) Not good for equality searches or range searches. NOT c) Supports range searches but not equality searches. d) Supports equality searches but not 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 true about B+ tree-based indexing? a) The lowest level of the tree - called the leaf level - contains the data entries. b) Finding the correct leaf page is faster than a binary search. c) It is an index structure that ensures that all paths from the root to a leaf in a given tree are of the same height. d) Finding the correct leaf page is done in nlogn time, where time is measured by node accesses. e) The data is contained within the nodes as well as in the leafs.

b) Finding the correct leaf page is faster than a binary search. a) The lowest level of the tree - called the leaf level - contains the data entries. c) It is an index structure that ensures that all paths from the root to a leaf in a given tree are of the same height.

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.

b) Forced output of blocks. AND e) Pinned blocks. AND NOT c) Disk striping.

A global depth indicator N in an extendible hashing scheme is used to identify which of the following? a) Identifies that there are 2**N number of data entries. b) Identifies that there are 2**N number of entries in the directory. c) Identifies that there are N number of entries in the directory. d) Identifies that there are N number of data entries.

b) Identifies that there are 2**N number of entries in the directory.

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.

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.

b) The fan-out of the tree.

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 a) The name of the table d) The integrity constraints on the table c) Attribute name and type for each attribute in the table

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.

When choosing a hash function to assign search key values to buckets, the function should have which of the following qualities? a) Exponential distribution. b) Uniform distribution. c) Linear distribution. d) Normalized distribution. e) Random distribution.

b) Uniform distribution. NOT a) Exponential distribution. d) Normalized distribution.

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

A B+ tree with a typical order of 100 and fill factor of 2/3 (i.e. fanout of 133), with a height of 4 can handle how many records? a) 4^133 b) 133 * 4 = 532 c) 133^4 d) 3^133 e) 133^3

c) 133^4

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 a) Initial part with fixed length attributes

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. b) Mirroring. d) Redundant arrays of independent disks (RAID). e) Improving MTBF.

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 attribute of a hashing function is which of the following? a) Even distribution of the sizes of the search keys. b) The ability to work recurrence relations. c) The ability for the function to work with minimal memory. d) Even distribution of the entries throughout the table. e) The ability of the function to grow the table appropriately.

d) Even distribution of the entries throughout the table.

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.

d) The number of bits of the value returned from the hash table to use.

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.

d) The size of the local depth indicatory exceeds the global indicator after the insert.

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


Ensembles d'études connexes

Communicating Effectively Chapters 1-15

View Set

Mod 5 Week 17 Quiz Review (Language Arts)

View Set

Active Listening: Connecting with Others/Empathy: The Foundation of Caring/Taking Aspiration Precautions

View Set

PN Neurocognitive Disorders Assessment

View Set

Section 3 quiz, the triumph of industry

View Set

Yalom Chapter 3 and 11 Corey Chapter 4

View Set