Databases Reference
In-Depth Information
when, later on, a different topic arrives at the library with the same title as a previous
topic.
The world of all possible entities of a specific type that a database might contain is
referred to as an entity class . We will use italics to denote entity classes. Thus, for
instance, the world of all possible topics is the Books entity class, and the world of all
possible authors is the Authors entity class.
We emphasize that an entity class is just an abstract description of something, whereas an
entity is a concrete example of that description. The entity classes in our very modest
LIBRARY example database are (at least so far):
Books
Authors
Publishers
The set of entities of a given entity class that are in the database at a given time is called
an entity set . To clarify the difference between entity set and entity class with an
example, consider the BOOKS table in the LIBRARY database, which is shown in Table
2-1.
Table 2-1. The BOO K S table from the LIBRARY databas e
ISBN
Title
Price
0 -12-333433-3
On Liberty
$ 25.00
0 -103-45678-9
Iliad
$ 25.00
0 -91-335678-7
Faerie Queene
$ 15.00
0-99-999999-9
Emma
$20.00
1 -22-233700-0
Visual Basic
$ 25.00
1-1111-1111-1
C++
$29.95
0 -91-045678-5
Hamlet
$ 20.00
0 -555-55555-9
Macbeth
$ 12.00
0 -99-777777-7
King Lear
$ 49.00
0-123-45678-0
Ulysses
$34.00
0 -12-345678-9
Jane Eyre
$ 49.00
0-11-345678-9
Moby-Dick
$49.00
0 -321-32132-1
Balloon
$ 34.00
0 -55-123456-9
Main Street
$ 22.95
The entities are topics, the entity class is the set of all possible books, and the entity set
(at this moment) is the specific set of 14 books listed in the BOOKS table. As mentioned,
the entity set will change as new books (book entities) are added to the table or old ones
are removed. However, the entity class does not change.
Incidentally, if you are familiar with object-oriented programming concepts, you will
recognize the concept of a class . In object-oriented circles, we would refer to an entity
class simply as a class and an entity as an object .
Search WWH ::




Custom Search