Not sure if "dynamic database" is the right name for this, but here's the challenge:
I'm designing a database that will be installed at a variety of facilities. The goal is for each facility to have an easy way to store their daily logs in a single location. The challenge is that each facility collects different data on a daily basis.
The more efficient way to do it is to design a table for each facility that looks like this example:
tblDailyLog
- Date (PK)
- OperatorName
- Meter1Reading
- Meter2Reading
- FlowRate
But of course, not every facility will have those data points. So here's what I was thinking instead:
tblReadingTypes
- ReadingTypeID (PK)
- ReadingTypeName
tblReadings
- ReadingDate (PK)
- OperatorName
tblReadingLog
- ReadingDate (FK) (CPK)
- ReadingTypeID (FK) (CPK)
- Result
I would then have "Meter 1 Reading", "Meter 2 Reading", and "Flow Rate" as elements in the ReadingTypes table.
It seems awfully redundant to repeat the ReadingDate foreign key over and over with each reading of each day, but I think it's the best way to give it the flexibility to work at other facilities.
Any thoughts or comments are appreciated!