Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary key
Message
De
20/03/2003 23:14:19
 
 
À
19/03/2003 10:04:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00766466
Message ID:
00768439
Vues:
23
Hi,
I am using auto-genrated value as PK and normalize my database design to 3rd level. Here is the structure of my tables.
In my design, my app should support multi outlet, multi barcode per item, multiple cpu, ppu for different outlet...

Table: tblItem_Info
Field: InoID (PK), ItemCode, ItemName, ...

Table: tblLocation
Field: LocCodeID (PK), LocCode, LocationDesc

Table: tblItem_MOutlet
Field: LocINoID (PK), LocCodeID(FK), INoID (FK), CPU, PPU, ...

Table: tblItem_MBarCode
Field: mBarcodeID(PK), INoID (FK), BarCode

Table: tblMOutlet_PPU
Field: MPPUID(PK), LocINoID(FK), PPU, markup, markdown ...

Table: Stock_Status
Field: StkStatus(PK), BarCodeID(FK), LocCodeID(FK), Qty

From the structure above, you may see that, I have to go thru multiple tables in order to get a simple info such as PPU using ItemCode

tblLocation + tblItem_Info->tblItem_MOutlet->MOutlet_PPU

In Order deduct or increase stock
tblLocation + tblItem_Info->tblItem_MBarcode->Stock_Status

1. I would like to know, does the design above "ok"?

2. Do you use databse command like SEEK, LOCATE to go thru each table to get the PK/FK, or using SQL JOIN? I found that using SQL to join 3 tables could be very slow even it is optimised IF records are alot.

3. For certain condition, I need up to 5 tables to get certain info or operation. Does you have the same case too?


Pls advise
Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform