Databases Reference
In-Depth Information
The entities of an entity class possess certain properties, which are called attributes. We
usually refer to these attributes as attributes of the entity class itself. It is up to the
database designer to determine which attributes to include for each entity class. It is these
attributes that will correspond to the fields in the tables of the database.
The attributes of an entity class serve three main purposes:
Attributes are used to include information that we want in the database. For
instance, we want the title of each book to be included in the database, so we
include a Title attribute for the Books entity class.
Attributes are used to help uniquely identify individual entities within an entity
class. For instance, we may wish to include a publisher's ID-number attribute for
the Publishers entity class, to uniquely identify each publisher. If combinations of
other attributes (such as the publisher's name and publisher's address) will serve
this purpose, the inclusion of an identifying attribute is not strictly necessary, but
it can still be more efficient to include such an attribute, since often we can create
a much shorter identifying attribute. For instance, a combination of title, author,
publisher, and copyright date would make a very awkward and inefficient
identifying attribute for the Books entity class—much more so than the ISBN
attribute.
Attributes are used to describe relationships between the entities in different
entity classes. We will discuss this subject in more detail later.
For now, let us list the attributes for the LIBRARY database that we need to supply
information about each entity and to identify each entity uniquely. I will deal with the
issue of describing relationships later. Remember that this example is kept deliberately
small—in real life we would no doubt include many other attributes.
The attributes of the entity classes in the LIBRARY database are:
Books attributes
Title
ISBN
Price
Authors attributes
AuName
AuPhone
AuID
Publishers attributes
PubName
PubPhone
Search WWH ::




Custom Search