Users can do advanced searches (they are many possible parameters):
/search/?query=toto&topic=12&minimumPrice=0&maximumPrice=1000
I would like to store the search parameters (after the /search/?
) for an email alert.
I have 2 possibilites:
- Storing the raw request (
query=toto&topicId=12&minimumPrice=0&maximumPrice=1000
) in a table with a structure like id, parameters. - Storing the request in a structured table id, query, topicId, minimumPrice, maximumPrice, etc.
Each solution has its pros and cons. Of course the solution 2 is the cleaner, but is it really worth the (over)effort?
If you already have implemented such a solution and have experienced the maintenance of it, what is the best solution?
The better solution should be the best for each dimension:
- Rigidity
- Fragility
- Viscosity
- Performance