Past_papers (Midterm1) Flashcards
Which one of the following statements is not a true statement about relational calculus and/or rational algebra?
a) Relational calculus is nonprocedural
b) Relational calculus uses logical operators
c) Relational calculus and relational algebra cannot be used for querying a database
d) Relational algebra is procedural
e) Relational calculus consists of tuple calculus and domain calculus
c) Relational calculus and relational algebra cannot be used for querying a database
Which statement below may not be correct about B+ trees?
a) Internal nodes of a B+ tree can have some data pointers other than tree pointers
b) The order of the B+ tree must be given as an input to be able to construct the tree
c) In B+ Tree, both adding and deleting a key starts from the leaves and may go
d) Leaves must all be at the same level
e) In B+ tree, one can reach to data records/blocks only from leaves
a) Internal nodes of a B+ tree can have some data pointers other than tree pointers
Which of the following is not a reason for the use of a relational DBMS?
a) Data independence
b) Privacy and recovery of the data
c) Preventing unauthorized accesses
d) Effciently querying big complex data of real-time applications
e) Adding, deleting, updating records easily and consistently
d) Effciently querying big complex data of real-time applications
Which of the following is not true for a B+ tree?
a) Search time even in the worst case is O(logn)
b) It effieciently supports both equality and range-based searches.
c) It is a tree that takes up little space and can always fit in main memory
d) It is always kept balanced, no matter what
e) Deletion and insertion of a key value in a B+ tree take O(logn) time in the worst case
c) It is a tree that takes up little space and can always fit in main memory
Which of the following relational operators should be used together instead of using natural join in the realtion model?
a) Selection, Intersect, Grouping
b) Interesect, Cartesian product, Selection
c) Cartesian product, Selection, Projection
d) Selection, Cartesian product, Union
e) Projection, Union, Selection
c) Cartesian product, Selection, Projection
Which of the following operator in the relational model does not require union compatibility?
a) Intersect
b) Difference
c) Natural Join
d) Union
c) Natural Join
Which of the following time is not necessarily taken into account when accessing the disc block (page)?
a) Disc rotational time
b) Latency
c) Block read time
d) Block transfer time
e) Disc seek time
c) Block read time
Which of the following is a correct proposition for EER (Enhanced Entity/Relationship)?
a) The relationship between a weak entity type R and the owner entity type S must always be 1-N (one-to-many) relationship and a partial participation constraint at the side of R is not possible
b) A subclass cannot have a selective inheritance relationship with its superclasses
c) The ternary relationship type gives the same meaning to relationships that can be obtained by pairwise associating each pair of object types in this relationship.
d) Two subclasses in the EER model cannot have more than one superclass
e) An entity type cannot have a cyclic relationship with itself
a) The relationship between a weak entity type R and the owner entity type S must always be 1-N (one-to-many) relationship and a partial participation constraint at the side of R is not possible
Which formula below can be used to correctly estimate the capacity of a magnetic disc?
a) disc capacity = # of tracks * # of sectors/track * bytes/sector
b) disc capacity = # of cylinders * # of tracks/cylinder * bytes/sector
c) disc capacity = # of tracks * # of cylinder/track * # of sectors/track * bytes/sector
d) disc capacity = # of cylinders * # of tracks/cylinder * # of sectors/track * bytes/sector
e) disc capacity = # of tracks * # of cylinder/track * # of track/sector * bytes/track
d) disc capacity = # of cylinders * # of tracks/cylinder * # of sectors/track * bytes/sector
Which of the following cannot be supported by a file system, but is directly supported by the use of a DBMS?
a) Data protection
b) Controlling data rebundancy
c) Data consistency
d) Data recovery
e) Logical data independency
e) Logical data independency
Which one of the following keys is specifically related to the category concepts of the EER data model?
a) superkey
b) primary key
c) foreign key
d) surrogate key
e) candidate key
d) surrogate key
Which one of the following statements is not correc the relational data model?
a) Every relation model have a key
b) Each attribute in a relation must have a unique name and a corresponding domain
c) A relation is defined as a set of the Cartesian products of fields (attributes) in that relation
d) Names of attributes that belongs to a relationship type must be included in the relation created for that relationship type
e) A relation’s foreign key value may have NULL values
c) A relation is defined as a set of the Cartesian products of fields (attributes) in that relation
Which of the following is true for indexing structures that can be created for a table?
a) Two primary indexes can be created for the same table at the same time
b) Not more than one B+ Tree structure can be created on the same table at the same time
c) Multiple clustured indexes can be created for the same table at the same time
d) One cluster index and one primary index can be created for the same table at the same time
e) One primary index and multiple secondary indexes can be created for the same table at the same time
e) One primary index and multiple secondary indexes can be created for the same table at the same time
Which one below correctly calculates the cost (total time, T) of searching for a record from a database in the worst case (if the record is not found in the sorted file and search continues at the overflow area too)?
Suppose that x: no. of blocks in the sorted part, y: no. of blocks in the overflow area, s: seek time, r: rotation time, btt: block transfer time?
a) T= x* (s + r + btt) + y* (s + r + btt)/2
b) T = (x/2) * (s + r + btt) + s + r + y * btt
c) T = logx * (s + r + btt) + (s + r+ (y/2) * btt)
d) T= x* (s + r + btt) + (s + r + y * btt)/2
e) T = (x/2) * (s + r + btt) + (y/2)* (s + r + btt)
c) T = logx * (s + r + btt) + (s + r+ (y/2) * btt)
Which of the following cannot be said for the key of a relation?
a) The key attribute of a relation may have a null value in a relation
b) A superkey may contain all the attributes in the table
c) The value of a superkey must be different for each tuple
d) The key of one table can be used as a foreign key in another table with the exact same name
e) The key to any relationship may consist of more than one attribute
a) The key attribute of a relation may have a null value in a relation