Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
General table design question
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
General table design question
Miscellaneous
Thread ID:
00176717
Message ID:
00176717
Views:
61
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
Next
Reply
Map
View

Click here to load this message in the networking platform