COMP 521 F10 Final Exam Review

Download Report

Transcript COMP 521 F10 Final Exam Review

COMP 521 F10
Final Exam Review
1. Which of the following is defined as a
property or description of an entity.
A. Relation
B. Attribute
C. Domain
D. Selection
E. Projection
Given the valid relation
Instance below,
A1
A2
A3
A4
A5
1020 1
3
102034 A
52
G
1043 1
4
120819 T
82
A
1130 2
4
389271 C
23
T
1729 2
0
389389 T
21
A
1920 3
1
120038 G
21
A
Which of the following sets
of attributes cannot be a
candidate key?
A. A1
B. A3
C. <A4, A5>
D. <A3, A4>
E. <A2, A3>
Which attribute can you
deduce is a candidate
key?
A. A1
B. A2
C. A3
D. A4
E. None of the above
A relation R(A, B, C), represents a relationship
between two entities with keys A and B
respectively. It also has the functional
dependences A? B and B ? A. What does such a
pair of dependences mean?
A. There is total participation of both entities
B. The relationship is one-to-one
C. The two entity sets form a disjoint cover
D. The relationship is many-to-many
E. The relation cannot be in BCNF
Which of the following SQL features
supports logical data independence?
A. Its portability across DBMSs
B. The fact that it is relationally complete
C. It’s declarative semantics
D. It’s support of ‘views’
E. All of the above
• Which of the following database properties
states that, once committed, data should persist
in the database, even if the system crashes.
•
•
•
•
•
A. Atomicity
B. Buffer Writes
C. Consistency
D. Durability
E. Equality
Which of the following most likely explains the result set of the SQL
query:
SELECT DISTINCT S.name
FROM Student S
WHERE S.id IN (
SELECT C.sid
FROM Class C
GROUP BY C.sid
HAVING COUNT (*) >= ALL (
SELECT COUNT (*)
FROM Class C2
GROUP BY C2.sid))
A. Names of students taking the class with the largest enrollment
B. Names of students taking the most classes
C. Names of students taking one or more classes
D. Names of all students taking no classes
E. Names of all students
What results from the following schedule:
R2(X), R2(Y), W2(X), R1(X), R1(Y), W2(Y),
W1(X)
A. A write-read conflict
B. A read-write conflict
C. A write-write conflict
D. No conflicts, equivalent to T1, T2
E. No conflicts, equivalent to T2, T1
18. Which of the following about record ids is false?
A. They uniquely identify a particular record
B. They identify the disk address of the page
containing the record
C. Given one, only one I/O is required to read the
associated record into memory
D. They determine the page buffer where a record is
stored in main memory
E. They appear frequently in indices
• 46. Which of the following is true after inserting
19 and 20 into the B+-tree shown?
• A. The tree will split and gain a level
• B. All nodes of the tree will be filled
• C. The tree’s structure is unchanged
• D. The resulting tree is identical to the original
• E. The tree looses a level
Questions?