I am designing a system for a company which provides multiple services to users, all of which generate a document. The documents all have a validity period. Some of the services can be grouped, and their documents have the same length of validity. None of the services have the same parameters, except for the general ones: date of service, date of document issue, date, client data, data from who ordered the service(sometimes different than the end client).
For example, two of the services are: inspection of electrical installations and inspection of lightning protection installations. They have the same general input parameters, but they have multiple other specific parameters.
The purpose of the system is to generate these documents in a uniform way for all services, and to track their validity period so clients can be notified and arrangements be made to perform new service and subsequently generate a new document.
The company will not be adding new services for a long time period. I am not constrained by time(it's my company).
I can't make a decision which relational database model is better for this situation.
Option 1. One table for each of the services, with helper tables for parameters which should generate a table in the document, connected by foreign keys. What I don't like about this is, in order to see the validity period of all services in some kind of client view, I would have to perform a UNION query on all these tables, or perform as many queries as there are services. Performance is not an issue but it somehow seems unnatural.
Option 2. Model like in this picture:
Not a proper ER model, just prototyping for now. I think you can understand the relations from the table names.
This model would define parameters for each service in db, along with types, which would be used to generate a UI interface for it. This means I would have only one view for create, update actions. Also, this way I could perform a query on services_clients table to find all the services performed for a client(join with services), with easy filtering options. There is also an easy way to perform validity checks on the documents.
To generate a document, I would be passing service_parameter_values for a performed service to a chosen template.
But, this seems like overengineering, and a step which should have been performed when there was only 1 or 2 services, not doing it retroactively when you have 10 of them or more.
All of this seems like there should be some kind of patterns, and I fear I am reinventing the wheel.