HPlogo Up and Running with ALLBASE/SQL: HP 3000 and HP 9000 Computer Systems > Chapter 2 Looking at Data

Distinguishing Entities and Attributes

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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.

Table 2-1 Attributes for Four Entities

Album EntitySelection EntityComposer EntityStation Log Entity
Album NameSelection TitleNameSelection Title
MediumComposer NameDate of BirthStart Time
Album CostTimingBirthplaceEnd Time
Recording CompanyPerformersCommentAnnouncer
Date RecordedComment 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.

Feedback to webmaster