Hope everyone is doing well. I am looking for a little design help with my accounts database. My current db main table is called tbl_accounts and part of that table is ytd revenue, ytd margin and the margin percentage is calculated in a query. I have fields built up to 2018, not a good design I know. That is why I am looking to move my revenue numbers into their own table and set up a relationship to the main accounts table via siteID. What I show currently on the accounts form is the current fiscal year totals which I will continue to show. Since I receive the revenue on a monthly basis that is how I would like to input that data and then the totals will automaticlly update.
The trouble I am having is which is the best way to design my revenue table. My first idea was to create a table with each month being a field; cyID, siteID, CalYr, Rev_Oct through Rev_Sept, (Our fiscal year starts Oct 1 and ends Sept 30), Mar_Oct - Mar_Sept.
My second idea was to create a table as follows; cyID, siteID, CalYr, Qtr, Month, Rev, Mar.
Another idea I had was to create a table fore revenue and a table for margins and linking them together and with the main accounts.
Revenuetbl: revID, siteID, Qtr, Month, Rev
MarginTbl: marID, revID, siteID, Qtr, Month, Margin
The results I am trying to acheive is to show YTD numbers for each account on my accounts form and also if requested to show monthly numbers. I also plan to create some graphs and charts with these numbers.
I think this should be simple but just a little stumped on design.
Thanks in advance for your responses
Vito