Вы находитесь на странице: 1из 3

Practice Exam 2

(These are intended to give you a sense for the types of multiple choice questions you might get. This is
NOT a full exam – the actual exam is LONGER.)

Multiple Choice

1. The primary key of the relation JOB is the attribute JobNumber. Two other attributes of JOB are
ContractorName and ContractorAddress. There is a functional dependency between ContractorName
and ContractorAddress (such that contractor name determines contractor address). In what normal
form is the JOB relation?

a. First (but not second) normal form.


b. Second (but not third) normal form.
c. Third normal form.
d. Fourth normal form.
e. none of the above.

2. The primary key of the relation SALE is the attribute SaleNumber. Two other attributes of SALE are
VendorName and VendorLocation. The VendorLocation is functionally dependent on the VendorName.
This is an example of a relation that has a:

a. partial functional dependency.


b. transitive dependency.
c. multivalued dependency.
d. repeating group.
e. none of the above.

3. An attribute in a relation of a database that serves as the primary key of another relation is called a:

a. link attribute.
b. partial key.
c. foreign key.
d. link key.
e. foreign attribute.

4. The ________ states that no primary key attribute may be null.

a. referential integrity constraint


b. entity integrity rule
c. partial specialization rule
d. range domain rule
e. none of the above

1
5. The foreign key corresponding to the GALLERY - PAINT relationship should have the following
constraint

a. Not Null, On Delete Restrict


b. Not Null, On Delete Cascade
c. Null Allowed, On Delete Restrict
d. Null Allowed, On Delete Cascade
e. Null Allowed, On Delete Set Null

6. The DROP TABLE statement:

a. deletes the table.


b. deletes all of the data records.
c. works whether or not referential integrity constraints would be violated.
d. blocks user from accessing a table
e. is not an SQL statement.

7. A data type of NUMBER(6,2) represents:

a. Integer at a length of 8, with the last 2 digits rounded.


b. Integer at a length of 6, with the last 2 digits rounded.
c. Any number at a length of 8, 6 digits before the decimal point, and 2 digits after.
d. Any number at a length of 6, 4 digits before the decimal point, and 2 digits after.
e. Any number at a length of 6, 2 digits before the decimal point, and 4 digits after.

8. If you were writing a SELECT statement and wanted to show all the data in a given row, you would
write:

a. SELECT ALL
b. SELECT *
c. SELECT TOTAL ROW
d. SELECT DISTINCT ROW
e. None of the above

2
Short answer

1. Answer the questions below using the following information:


CLASS (ClassID, SectionNum, ClassName, InstructorName, Enrollment)
FD: ClassID --> ClassName
SectionNum --> InstructorName

a. In what normal form is the original relation? ___________________

b. Why is it in that normal form (and not a higher or lower one)?

_____________________________________________________________________________________

c. Transform the relation into a set of relations in 3NF.

2. Transform the E-R diagram into a set of relations in 3NF. Be sure to include the foreign key constraints.

Вам также может понравиться