b_bookg.gif (182 bytes)Guides (Oracle8p)

Case Study: Heights

H-1

Requirements Analysis


dbh_ra2.gif (2417 bytes)

When designing a database, a good place to start is to work out what we want out of the system. In this case the database will be used to record the names and heights (in centimeters) of people you know.

Reports required will give us a good indication of what data we need to store in the database.

In this case we would like to produce a report listing all the people in height order.

dbh_ra1.gif (2993 bytes) Before you build the database you should sit down an sketch out the tables and fields needed to complete the task.

Failure to do this will usually result in unstable tables that need to be modified at a later stage.

  • People database
    • Heights table
      • FullName
      • Height
From this the structure of the database, tables, records and fields can be developed.
  • The database will be called People.
  • An Oracle8 database can contain many tables (groups of related data), so we'll call the table Heights.
  • Each Table contains the actual data, organised into records (related data) and fields (individual pieces of data).
  • Each record is defined in term of the individual fields, here we'll use FullName (to store the person's name) and Height (To store the person's height).

Table design: Heights

Finally work out the data types and sizes for each field.

Key Field Name Data Type Description Field Size Required
Yes FullName Text   30 Yes
  Height Number   Integer
(+/-32,767)
No

[Rev 20/04/99] 24/3/98 © 1999 V/2-Com (Verhaart), P O Box 8415, Havelock North, New Zealand.