This seems like a very wide open and arbitrary demand. Some questions:
How complicated will the business rules you are trying to model be? If you allow (business) users to define their own vouchers, the chances are good, they will come up with some pretty Byzantine rules and combinations. If you need to support anything , they will have problems.
What will the database do with this data? Keep the โvoucher definitionโ of course, but what then? Perform calculations or reports about them? Analyze how many of them are used, by whom / when / how / for what? Or just indicate what was used / created in the last year?
How much data will you have? One entry per voucher definition, or per voucher printed / issued? (If the latter, can you use one entry per voucher, with the number issued?) Do we say dozens, hundreds or millions of vouchers?
If its a completely free form, if they just want a listing without serious analysis, if the total volume is small, consider using blob fields rather than null oriented columns. Something like a large text field and a data entry window in which the user will "Enter any other criteria that define the voucher." (You might even do this using XML.) Awful, you cannot easily parse the data, but if the goals are too big or blurry and you are not going to use all this detailed data, it may be necessary.
Last note: a voucher that is good only for selected products cannot be used for products that are added after the creation of the voucher. A voucher that is good for all but selected products can be used for subsequently created products. This logic can be applied to any criteria restricting a voucher. Both methodologies have an advantage; make sure that users understand what they are doing.
source share