Databases Reference
In-Depth Information
PubID
Let us make a few remarks about these attributes.
From these attributes alone, there is no direct way to tell who is the author of a
given book, since there is no author-related attribute in the Books entity class. A
similar statement applies to determining the publisher of a book. Thus, we will
need to add more attributes in order to describe these relationships.
The ISBN (International Standard Book Number) of a book serves to identify the
book uniquely, since no two topics have the same ISBN (at least in theory). On
the other hand, the Title alone does not uniquely identify the topic, since many
topics have the same title. In fact, the sole purpose of ISBNs (here and in the real
world) is to identify topics uniquely. Put another way, the ISBN is a quintessential
identifying attribute!
We may reasonably assume that no two publishers in the world have the same
name and the same phone number. Hence, these two attributes together uniquely
identify the publisher. Nevertheless, we have included a publisher's ID attribute
to make this identification more convenient.
Let us emphasize that an entity class is a description, not a set. For instance, the entity
class Books is a description of the attributes of the entities that we identify as topics. A
Books entity is the “database version” of a book. It is not a physical book, but rather a
book as defined by the values of its attributes. For instance, the following is a Books
entity:
Title = Gone With the Wind
ISBN = 0-12-345678-9
Price = $24.00
Now, there is certainly more than one physical copy in existence of the topic Gone With
the Wind , with this ISBN and price, but that is not relevant to our discussion. As far as
the database is concerned, there is only one Books entity defined by:
Title = Gone With the Wind
ISBN = 0-12-345678-9
Price = $24.00
If we need to model multiple copies of physical books in our database (as a real library
would do), then we must add another attribute to the Books entity class, perhaps called
CopyNumber. Even still, a book entity is just a set of attribute values.
These matters emphasize the point that it is up to the database designer to ensure that the
set of attributes for an entity uniquely identify the entity from among all other entities
that may appear in the database (now and forever, if possible!). For instance, if the Books
entity class included only the Title and Price attributes, there would certainly be cause to
worry that someday we might want to include two books with the same title and price.
While this is allowed in some database-application programs, it can lead to great
Search WWH ::




Custom Search