Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Hi John,
I'd have 2 comments:
1. Stay away from using user data as PK, you will be better off doing that as a rule of thump.
2. I'd have 2 tables, one called Items which has Serial No,Matrix(Logical),
PK and another called Item_details which has PK, FK (Serial
No.),Color,Size,Qty & OutletID.
Always put the Qty in the details table regardless of the Mbar status and create a view (lv_status) to link the two tables with sum of Qty in the details table.
With index set on the FK (serial No.) in the item_details table, you should get good speed when joining the 2 tables.
Let me know what you think.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement