[ City Zoo | Announcements | Articles | Tips & Tricks | Bug List | FAQ | Sites ]
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.
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: email@example.com.
Watch for the next step in a couple of days!