Borland Delphi

[ City Zoo | Announcements | Articles | Tips & Tricks | Bug List | FAQ | Sites ]

Client/Server Solutions

by Michael McGaha

RETURN TO... Client/Server Solutions (Introduction)

I. Server Side

A. Table Design

The first step to most C/S projects is to define what you want to do and design a tentative table layout for your database. Our project will be a Bill Of Materials manager. What we want to do is maintain a hierarchy of assemblies and components with the quantity per assembly for each component.

For Example:

 |   |---Block
 |   |---Pistons
 |    ---Etc...
 |   |---Doors
 |   |    |---Door Handle
 |   |    |---Lining
 |   |     ---Etc...
 |   |---Windows
 |    ---Bumpers

This is a rough idea of what we want to do, but you should get a feeling of the type of data we want. So let's define the tables. First, lets set up a Parts Table so we can keep information about our parts:

Table: Parts

  Field        Type            Length
  Part         LONG                      *unique key
  Description  CHAR              24
  Cost         DOUBLE(or money)

You can add more fields to this table if you need to keep more information on your parts, but this will do for what we want. Now lets define our actual Bill of materials table:

Table: BOM

  Field        Type            Length
  Assembly     LONG                      *Part from Parts Table
  Component    LONG                      *Part from Parts Table
  QPA          DOUBLE                    (Quantity Per Assembly)

Now we have everything we need to build a complex hierarchy to represent our production method. Our next step will be to add some triggers and stored procedures to aid in the management of these tables.

For any questions about these steps, E-mail me:

Watch for the next step in a couple of days!

[ Home Page | What's New | About CITY ZOO | Borland Delphi | About the Authors | INDEX ]
Copyright © 1995 Michael McGaha. This is a CITY ZOO production.
Last revised June 26, 1995.
Enhanced version