Hi all,
I've been going back and forth on the relationships I have for a particular database and am now desparate enough to bother anyone who will read/assist.
I've got a database that needs to track financial transactions. Normally this would be cut and dry for me, but I think I've been looking at it too long that I just am not seeing it clear anymore.
My office has expenditures and invoices (submitted by companies) they must track to a project. The kicker is, the expenditure is the total value that can be spent and if it goes over they need another...an invoice may or may not fall under these expenditures. So this means that if an invoice is submitted for this project, it might just be a floating invoice that needs to be tracked to the project. We are ultimately reviewing the total of money spent on the project in the end.
So the long and short of it is the expenditure doesn't necessarily link to the invoice but it links the case. And the expenditure links to the project no matter what, but might not ever have an invoice. Therefore I have put a link table for when they do. On the flip side, I have put a link table to join the company and the project number and that link ID is related to the invoice and expenditure. Oh and I have to be able to show how much is remaining in the expenditure and be able to add an existing invoice to another (new) expenditure...ahhh. But that's another crazy problem.
Here is my structure I'm abbreviating names, this is not my naming convention):
ProjectLinktable:
ID (linked 1 to many, Expenditure and Invoice)
CompanyID
ProjectID
ExpenditureInvoiceLinkTable:
ID
ExpenditureID (linked 1 to many ExpenditureTable)
InvoiceID (linked 1 to many InvoiceTable)
CompanyTable:
ID (linked 1 to many CompanyEmployeeTable)
CompanyName
ProjectTable:
ID (Linked 1 to many to the projectlinktable)
etc
ExpenditureTable:
ID (linked 1 to many ExpenditureInvoicetable)
LinkTableID (linked 1 to many, ProjectLinkTable)
Etc
InvoiceTable:
ID (linked 1 to many ExpenditureInvoicetable)
LinkTableID (linked 1 to many, ProjectLinkTable)
etc
Hopefully this is making sense, I have to admit I get into a tunnel with the relationship rules that I have a hard time seeing clearly. Any help is much appreciated.
Sarah
I've been going back and forth on the relationships I have for a particular database and am now desparate enough to bother anyone who will read/assist.
I've got a database that needs to track financial transactions. Normally this would be cut and dry for me, but I think I've been looking at it too long that I just am not seeing it clear anymore.
My office has expenditures and invoices (submitted by companies) they must track to a project. The kicker is, the expenditure is the total value that can be spent and if it goes over they need another...an invoice may or may not fall under these expenditures. So this means that if an invoice is submitted for this project, it might just be a floating invoice that needs to be tracked to the project. We are ultimately reviewing the total of money spent on the project in the end.
So the long and short of it is the expenditure doesn't necessarily link to the invoice but it links the case. And the expenditure links to the project no matter what, but might not ever have an invoice. Therefore I have put a link table for when they do. On the flip side, I have put a link table to join the company and the project number and that link ID is related to the invoice and expenditure. Oh and I have to be able to show how much is remaining in the expenditure and be able to add an existing invoice to another (new) expenditure...ahhh. But that's another crazy problem.
Here is my structure I'm abbreviating names, this is not my naming convention):
ProjectLinktable:
ID (linked 1 to many, Expenditure and Invoice)
CompanyID
ProjectID
ExpenditureInvoiceLinkTable:
ID
ExpenditureID (linked 1 to many ExpenditureTable)
InvoiceID (linked 1 to many InvoiceTable)
CompanyTable:
ID (linked 1 to many CompanyEmployeeTable)
CompanyName
ProjectTable:
ID (Linked 1 to many to the projectlinktable)
etc
ExpenditureTable:
ID (linked 1 to many ExpenditureInvoicetable)
LinkTableID (linked 1 to many, ProjectLinkTable)
Etc
InvoiceTable:
ID (linked 1 to many ExpenditureInvoicetable)
LinkTableID (linked 1 to many, ProjectLinkTable)
etc
Hopefully this is making sense, I have to admit I get into a tunnel with the relationship rules that I have a hard time seeing clearly. Any help is much appreciated.
Sarah