FD_practice_key_part1

.pdf

School

Northern Virginia Community College *

*We aren’t endorsed by this school

Course

MISC

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

1

Uploaded by DoctorComputerMule3

Report
1. Consider a relation R with five attributes ABCDE. You are given the following dependencies: A ® B, BC ® E, and ED ® A. a) List all candidate keys for R. CDE, ACD, BCD b) Is R in 3NF? Yes. B, E, and A are all prime attributes. c) Is R in BCNF? No. None of A, BC, ED contain a key. 2. Suppose that we have the following three tuples in a legal instance of a relation schema S with three attributes ABC (listed in order): (1, 2, 3), (4, 2, 3), and (5, 3, 3). a) Which of the following dependencies can you infer does not hold over schema S? A ® B, BC ® A, B ® C BC ® A doesn’t hold over S. look at (1, 2, 3), (4, 2, 3) b) Can you identify any dependencies that hold over S? No. Given just an instance of S, we can say that certain dependencies are not violated by this instance, but we cannot say that these dependencies hold with respect to S. To say that an FD holds w.r.t. a relation is to make a statement about all allowable instances of that relation! 3. Suppose you are given a relation R with four attributes, ABCD. For the following sets of FDs: C ® D, C ® A, B ® C, assuming those are the only dependencies that hold for R. a) Identify the candidate key(s) for R. Candidate keys: B b) Identify the best normal form that R satisfies (1NF, 2NF, 3NF, or BCNF). R is in 2NF but not 3NF. It is in 2NF because B is the only key and has a single attribute so that there is no partial dependency. It is not in 3NF because C ® D and C ® A are both transitive dependencies and D and A are both non-prime attributes.
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help