I am working on a database model and one of the areas I need to address is a client configurable checklist table(s). Ideally the client would have a set of predefined checklists that I could then enter as bit columns. Alas, this is not going to happen. The client wants the ability to add and group checklists so they are reusable.
I could go with an EAV type model and use strings for “true/false” but I’ve been down this road before and would rather not take that journey again.
Any thoughts or suggestions are welcome. Thanks.
“Client Configurable” almost always means EAV. EAV’s store data fine… it’s just getting the data back out that’s the trick.
😉
The other… somewhat-less objectionable approach is to make generic columns. Answer1 BIT, Answer2 BIT, Answer3…
If you do this, then make a table where you define the real names of the columns so that you could build the correct view for any given check list.
Say the first check list is
Then store
Then the view would be:
It obvious how the view would be dynamically generated.
The downside is that if you include 10 columns they can’t have more than 10 EVER.
XML is the other possibility and doesn’t suffer that issue… however it’s not quite as SQL friendly.