(Text version)
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:

Car
 |--Engine
 |   |---Block
 |   |---Pistons
 |    ---Etc...
 |--Body
 |   |---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: 74671.2711@compuserve.com.

Watch for the next step in a couple of days!

® Delphi is a registered trademark of Borland International.
[ Home Page | What's New | About CITY ZOO | Borland Delphi | About the Authors | INDEX ]


74671.2711@compuserve.com
Copyright © 1995 Michael McGaha. This is a CITY ZOO production.
Last revised September 4, 1995.