We're developing a system that helps users with managing their maintenance activities, mostly performed on machines and such.
Users can add machines to their catalog. Different machines need different maintentance schemes, but some of them should be able to share the same maintenance scheme, while keeping machine specific maintenance status. This functionality is basically reminding users when to perform certain activities.
Each scheme consists of multiple activities that should be performed every N days/months.
So when user defines a maintenance scheme it should look something like this:
Maintenance Scheme - Machine type RA1
Activities:
Activity1 - perform every 1 month
Activity2 - perform every 6 months
Activity3 - perform every 12 months
...
Each machine has it's own maintenance status:
Maintenance Status - Machine RA1-004
Activities:
Activity 1 - perform in 7 days
Activity 2 - ok
Activity 3 - Warning! Perform asap
...
Now every time I try to wrap my head around the database design for this use case I:
- come up with a spaghetti like structure
- come up with loosely tied structure
- both happen at the same time
This structure allows to quickly identify chosen scheme and current maintenance status, but on the other hand propagating changes to schemes seems like a huge pain. Is my approach anywhere close to being optimal? Is there any way to make it easier to propagate changes and simplify this design?