1

I have following table:

Book_Name       Author  Edition Year
DB_fundamentals Navathe 4       2004
DB_fundamentals Elmasri 4       2004
DB_fundamentals Elmasri 5       2007
DB_fundamentals Navathe 5       2007

Without any knowledge I have to determine possible candidate keys. Obviously it would be {Book_Name, Author, Edition}. From the solutions of my professor this would be correct. But I would go further and say that {Book_Name, Author, Year} would also be correct. But in this regard he said "we should consider that some books may have a release cycle which causes multiple editions to appear in a given year." But why should someone (from "common-sense" like he said) release two or more books with the same name AND edition in the same year (or at all)?

What do you guys think about this? I don't get it.

philipxy
  • 14,867
  • 6
  • 39
  • 83
  • "But why should someone ..." - because it was sold out and re-printed again within the same year? – Littlefoot Feb 10 '19 at 17:44
  • But wouldnt it be then a new edition? Like "Edition 4.5" or "Edition 4 v2" or something like that? –  Feb 10 '19 at 17:46
  • I don't know. To me, a "new" edition means that something changed (for example, a new chapter was added, the old one was rephrased (because it is no longer valid). If nothing changed, that would still be the same edition. However, I know nothing about that so we're just chatting. – Littlefoot Feb 10 '19 at 17:48
  • I mean yeah thats subjective. The question was just dumb asked, imo, would you agree with that? –  Feb 10 '19 at 17:56
  • 1
    If professor's intention was to make you think about it, I guess they succeeded. There's probably no definite answer to that. Maybe they are right, maybe you're right, maybe both. Maybe it doesn't really matter, as long as you understand the general *candidate keys* idea. – Littlefoot Feb 10 '19 at 18:00
  • It's fruitless to argue about what implications follow from common sense. (Or column names.) Just clearly justify any business rules & the corresponding design. One cannot determine FDs & hence CKs without knowing what a table means (how to map a prospective member tuple to statement about a business situation) and what what business situations can arise per the business rules. – philipxy Mar 03 '19 at 22:11

1 Answers1

1

A book edition would presumably uniquely identify the book being released. The year is -- presumably -- the year of release.

Your interpretation would be correct if the data represented "what books are being shipped from our warehouse". In that case, an edition could be shipped in multiple years.

The professor is obviously thinking "what book editions have been published".

In other words, without knowing the purpose of the table, you can't really specify. Sometimes the purpose is "obvious" from the data, but not necessarily.

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786