Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Database design again
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00833424
Message ID:
00835543
Vues:
22
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform