Midterm1 Flashcards
Which operation benefits the most from a B+ tree index?
a) None of the other choices
b) Performing a range query to retrieve multiple records
c) Deleting a single record
d) Updating a specific field in a record
e) Counting the total number of records in a table
b) Performing a range query to retrieve multiple records
Which one below is not correct about Primary and Clustered index?
a) A clustered Index is always unique
b) Only one clustering index can be created per table, but it may include multiple columns
c) Tables can exist without a clustered or primary index, but in that case data will be stored in the order of insertion
d) None of the other choices
e) Primary and Clustered indexes do not usually require additional disk space.
a) A clustered Index is always unique
When a new record is inserted into a B+ tree index, how does the tree typically accommodate the new entry while maintaining its properties?
a) By promoting the new record to the root node
b) By moving the entire tree to secondary storage
c) None
d) By splitting a leaf node and redistributing keys
e) By removing the last leaf node and appending the new one.
d) By splitting a leaf node and redistributing keys
Which operation is typically faster in a sequential file organization?
a) Searching for a specific record by key
b) Deleting a record from any position in the file
c) Updating the values of a record
d) All are equally fast
e) Inserting a new record in the middle of the file
a) Searching for a specific record by key
Based on the discussions in our lectures, which of the following three approaches can be used when we map a 1-to-1 relationship from our ER diagram to a relational schema?
(1) the foreign key approach
(2) the merged relationship approach
(3) the cross-reference (or relationship relation) approach
All three.
What is the primary purpose of a clustered index in a physicla database?
a) To optimize query performance by physically ordering data
b) None
c) To enforce the uniqueness of a primary key
d) To determine the logical order of rows in a table
e) To create a non-unique index for faster data retrieval
a) To optimize query performance by physically ordering data
How does a dynamic hash index handle hash collision?
a) It redistributes records to new buckets.
b) It discards the colliding records.
c) It locks the database for maintenance
d) The choice of which one to use depends on the specific situation.
e) It increases the hash function complexity
a) It redistributes records to new buckets.
A blank triangle in a UML diagram indicates the following:
a) Specialization/generalization with the disjoint constraint
b) Specialization/generalization with the overlapping constraint
c) Association
d) Base class
e) Aggregation
a) Specialization/generalization with the disjoint constraint
Consider the relation schemas R = (A, B, C, D) and S = (D, E, F). What will be the degree of the resultant schema R * S, where the star (*) symbol represents the natural join operation?
a) None
b) 6
c) 5
d) 1
e) 7
f) 12
b) 6
If a B+ tree index is created for primary or clustered indexing, where are the actual data records typically stored?
a) In the internal nods of the tree
b) In the leaf nodes of the tree
c) None of the other choices
d) In the root node of the tree
e) In a separate data file
b) In the leaf nodes of the tree
________ is the process of defining a set of subclasses of an empty type
a) Expansion
b) Categorization
c) Division
d) Generalization
e) Specialization
e) Specialization
A filled diamond in a UML diagram represents the following
a) Inheritance
b) Specialization/Generalization
c) Composition
d) Aggregation
e) Association
c) Composition
If Block size = 8K, File size = 8M, Block transfer time (btt) = 0.1 ms, seek time (s) = 10.0 ms, rotational delay (r) = 5.0 ms, what is the total in ms to fetch all of the records form a pile file?
a) 415
b) None
c) 115
d) 815
e) 15100
e) 15100
If Block size = 4K, File size = 20M, Block transfer time (btt) = 0.1 ms, seek time (s) = 10.0 ms, rotational delay (r) = 5.0 ms, what is the total in ms to fetch all of the records form a fully sorted file?
a) None
b) 1510
c) 415
d) 15100
e) 4151
a) None
What is the main drawback of using a dynamic hash index?
a) All of them pose an equal drawback
b) Limited support for concurrent updates
c) Poor performance for read operations
d) Complexity in managing hash collisions
e) Inefficient storage space utilization
d) Complexity in managing hash collisions