Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
General table design question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
General table design question
Divers
Thread ID:
00176717
Message ID:
00176717
Vues:
62
I'm looking at how I might set-up some tables in a current project. I have invoices that can have either invoices "costed" against it, or Labor. This information is used to calculate the profit. Is there any benefit to having two different tables, one for Costed_Labor, one for Costed_Invoices, or just having one table that contains both?

I'm thinking the general format of the tables would be:

Costed_Invoices
-----------------
iid : Primary Key
OurInvoice_FK : Foreign key pointing to invoice this is costed against
PostingDate
InvoiceDate
InvoiceNum
Amount
Vendor_FK : Foreign key pointing to vendor for this invoice

Costed_Labor
-----------------
iid : Primary Key
OurInvoice_FK : FK point to our orig. invoice
Worker_FK : FK pointing to worker info
Hours : Hours worked on this invoice
Amount: Amount paid per hour


This could easily represented by only one table (by merging the fields). Any downfalls to either approach?

-Paul
-Paul

RCS Solutions, Inc.
Blog
Twitter
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform