Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Database design again
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00833424
Message ID:
00835543
Views:
21
Here is how I would design it, John

Parent Table: item

NPK n(10)
cDefBarCode c(15)
cType (10) && type is either Normal, SerialNo or Matrix


Child Table: item_details

nPK n(10)
nFK n(10)
nQty n(10,2)
cColor c(10)
cSize c(3)
cBarCode c(15)
nSerialNo n(15)

The Trick when implementing the views:

1. a generic one for calculating Quantities in Stock (Normal and SerialNo Items) is to have all fields from item table plus sum(nQty) from item_details

2. Another View is paramterized on the item_detail table with nFK=nPK in the item table, include all fields in that table.

Hope that works for you.
Previous
Reply
Map
View

Click here to load this message in the networking platform