Question:
I'm having trouble selecting keys for relations that came from weak entity sets.
Don't they include attributes from some other relation?
Answer:
The key for a relation is a matter to be decided within that relation alone.
If you converted from weak entity sets correctly, then you will have among the
attributes of that relation a set that serves as a key for the relation, in
the sense that two tuples of the relation would not agree in all those attributes.
What you may be concerned about is a foreign-key declaration, which we
have not yet covered.
That allows you to say that the attributes from some entity set E that
you ``borrowed'' to help form the key for your weak entity set's relation
must have a value that also appears as the key for the relation derived from
E.
Question:
Do I have to populate all my relations with tuples?
Answer:
Yes, we expect at least a few tuples in every relation.
Question:
If title and year are the key for books, then using only the book title in
the key for other relations causes some strange restrictions.
Answer:
Right. We have changed the problem to assume that book titles are unique
(a bad assumption, but it will simplify life here).