I could use some advice on how best to model a "Company" in an expense database...
This system will keep track of all travel expenses a person incurs. For each "Order" there will be one and only one "Company".
The problem is that most Companies have multiple locations.
For instance, let's say that Sally is on a roadtrip and she stops and buys food and office supplies at 3 different Walmart locations:
Walmart 1100 Belt Drive Albany, NY Walmart 2700 Tech Way Trenton, NJ Walmart 1000 Constitution Drive Philadelphia, PA
Originally, I was just going to do this...
COMPANY -||------0<- ORDER
That would work, but it wouldn't be normalized, and maybe it would be harder to roll up the data for reporting, say when you want to see how much we spent at Walmart in 2019?
So I am wondering if it makes sense to break things out like this...
COMPANY -||------|<- COMPANY_LOCATION -||------0<- ORDER
From a database standpoint, I suppose that is more correct, but then it probably will make coding the front-end more complex, and maybe unnecessarily so?!
What do you think?