I am creating a functionality in my database that pulls a list of billings by project order # and sums all the billings within a certain date range to find the total billings within that range for that particular project.
I have a report that pulls a list of billings for various projects. This report has no unique identifier for the billing, all it has is the following information: project, date of bill, amount of bill.
so for example it could like this this:
tblBillings
project1 | 4/3/2019 | $100.00
project1 | 4/3/2019 | $100.00
project1 | 4/3/2019 | $100.00
project1 | 4/3/2019 | $25.00
project1 | 4/1/2019 | $50.00
As you can see, there is no good standard of 'uniqueness' in this report. I will be, on a weekly basis, be updating this data by deleting all records in the tblBillings table and putting in a fresh batch because billing entries that already exist require no future updates (for any particular billing, the amount, date and project will never change - the data is static). New reports will have all the entries from previous reports + newly registered billings.
My question is, for the feature I have in mind, what is the best method of implementation? Should I set up a one to many relationship between the 'project' and the associated billings in tblBillings with no integrity checks? Or should I keep the table severed completely? Is there a easier/better way to accomplish the same goal?