General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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.
Previous
Next
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