HP 3000 Manuals

Distinguishing Entities and Attributes [ Up and Running with ALLBASE/SQL ] MPE/iX 5.0 Documentation


Up and Running with ALLBASE/SQL

Distinguishing Entities and Attributes 

As you begin to design the music database, you are either creating a new
system or you are transferring data from a non-relational system to
ALLBASE/SQL. Regardless of where you're coming from, you need to take a
comprehensive look at all the information needs that will be served by
the database system.  This means identifying the elements for which you
need to store and retrieve information.  These elements are known as
entities.  A list of entities grows out of studying how the data is used
by its owners.

Listing Entities 

By approaching the problem intuitively, you can probably identify four
different categories of information required by the radio station:

   *   Album information.
   *   Selection information.
   *   Composer information.
   *   Station log information.

These are the entities in the data.

Listing Attributes 

Next, you need to define the attributes of each entity, which are the
useful pieces of information to be stored in tables.  In addition to
supplying informational detail, some attributes are used to distinguish
one entity from another.  As you subdivide your data, make sure that for
each entity you define, at least one attribute can uniquely identify an
instance of the entity.  This attribute or group of attributes is known
as a key.

          Attributes for Four Entities 

-------------------------------------------------------------------------------------------------
|         Album         |       Selection       |       Composer        |      Station Log      |
|        Entity         |        Entity         |        Entity         |        Entity         |
-------------------------------------------------------------------------------------------------
- Album Name            - Selection Title       - Name                  - Selection Title       -
- Medium                - Composer Name         - Date of Birth         - Start Time            -
- Album Cost            - Timing                - Birthplace            - End Time              -
- Recording Company     - Performers            - Comment               - Announcer             -
- Date Recorded         - Comment               -                       - Comment               -
- Manufacturer's Code   -                       -                       -                       -
- Comment               -                       -                       -                       -
-------------------------------------------------------------------------------------------------

As the design evolves, entities eventually become database tables, and
attributes eventually become columns.  Note, however, that at this stage
you have not yet identified the form of the database tables.  Before you
can do that, you need to identify relationships.



MPE/iX 5.0 Documentation