Head First SQL by Lynn Beighley

Head First SQL by Lynn Beighley

Author:Lynn Beighley [Lynn Beighley]
Language: eng
Format: epub, mobi, pdf
Tags: COMPUTERS / Programming Languages / SQL
ISBN: 9781449360443
Publisher: O'Reilly Media
Published: 2009-06-29T16:00:00+00:00


Exercise Solution

Take a look at this table listing book titles. pub_id identifies the publisher. pub_city is the city where the book was published.

There are no Dumb Questions

Q:

Q: Is there a simple way to avoid having a partial functional dependency?

A:

A: Using an id field like we have in my_contacts allows you to completely avoid the issue. Since it’s a new key that exists only to index that table, nothing is dependent on it.

Q:

Q: So, other than when I create junction tables, why would I ever want to create a composite key out of columns in my table? Why not just always create an id field?



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.