Table design

G

Guest

I want to develop a database for a shoe factory. In this database I what to
receive orders from customers and based on those orders make shoes to fill
those orders. I have two departments: Sewing (Componets table), and Molding
(FinishShoe table). Once the orders are entered I want the Sewing department
to have a report of how many Uppers of each size and style shoe they need to
sew for each customer's order and in this report I want a running balance of
what is left of the order for their department to produce. I want the same
report for the Molding department. So far I have 8 tables and I have followed
Codd's rule as I understand it (each table has a pk and the foreign key is
only in one table as to not duplicate data). What I want is my tables
reviewed and some suggestions to make them better as I tend to over think
some things and totally miss others.

The Customers table and Shippers table hold just what they say, information
only related to those two subjects. Those two tables relate to the Orders
table via foreign keys in the Orders table. The Orders table is basic and
relates to the Order Details table. The Order Details table relates to the
products table. Up to here I feel pretty confident because I used the tables
directly from the Northwind sample database. Now where I get confused is
adding the ShoeCatagories table (Three distinct shoe styles), Componets table
(different sizes of Uppers for the three distinct shoe styles) and
FinishedShoe table (different sizes of shoes for the three distinct styles).

One of the things I am confused about is do I need to have two fields in
each of the two above tables (Componets and FinishedShoe) to show incomming
and outgoing shoe production for each table or can I show one numeric field
in each table, subtracting or adding one table totals from the other to
obtain production and inventory levels in each part of production the table
represents? A couple of examples are as follows:

Componets needed to be made (Uppers) would be represented by the "Quantiy"
in table "Order Detail", minus how many Uppers were made in table
"Componets", field "ComponetsInStock" equal the amount needed to be made for
that particular order?

If so then I would have to do a similar calculation for each report i.e. the
"Quantiy" in table "Order Detail", minus "FinishedShoe" table
"FinishedShoeUnits" which represent completed shoes equal the amount of units
needed to be molded/finished to complete the customer's order in table "Order
Details".

So this post has two requests/questions:

1) What I want is my tables reviewed and some suggestions to make them
better as I tend to over think some things and totally miss others.

2) Do I need to have two fields in each of the two above tables (Componets
and FinishedShoe) to show incomming and outgoing shoe production for each
table or can I show one numeric field in each table, subtracting or adding
one table totals from the other to obtain production and inventory levels in
each part of production the table represents?
 
G

Guest

Hi Dennis,
From your description you may be getting a little over complex.
Perhaps separating the "component" side from the "process flow" side may
help clarify the issues

"I want a running balance of what is left of the order for their department
to produce" suggests the entry of time related data, and its not immediately
obvious to me how this would work
Perhaps a flow description covering tthe "life" of a typical order in
production terms rather than database terms would help.

If you would like to contact me direct, email
chris
at
mercury-projects
dot
co
dot
nz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top