General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only