I need some advice on table structure. I’m designing for a mysql back-end but there is no requirement that this be so. Thus if I have posted in the wrong group please let me know!
I am designing a contract management system for in-house legal departments. Requirements include that
* contracts are categorised with a type (i.e. NDA’s, software licences etc)
* each contract type has a different set of meta-data but there will be certain #
* meta-data-points that will be common to all contract types
* contracts need to be searchable across contract types (by entry of keywords rather than queries on specific fields).
This leads me to a design decision: should I
1. input ALL contract types to the same table and just make sure that there are a great number of fields that may be redundant for some contract types but not others (i.e. reuse varchars/dates etc and dynamically plot their labels for each contract type)? In this model there would be an innate limitation on how many fields could actually be used for each template (unless I build table modifiers into each template).
2.. Have one table that stores the common information and then a further table for each contract type, and use some javascript or multiple page interaction on the front-end to display the right field types to the user
3. Concatenate all the field and values and insert them into a text field in a separate table and conduct full text searches against this field?
Even as I type this I’m leaning more heavily towards the second option. However, I’m certain that this structural problem has been met and overcome countless times before and I’d be grateful for any views or insights that you may have.
Thanks
Justin
I am designing a contract management system for in-house legal departments. Requirements include that
* contracts are categorised with a type (i.e. NDA’s, software licences etc)
* each contract type has a different set of meta-data but there will be certain #
* meta-data-points that will be common to all contract types
* contracts need to be searchable across contract types (by entry of keywords rather than queries on specific fields).
This leads me to a design decision: should I
1. input ALL contract types to the same table and just make sure that there are a great number of fields that may be redundant for some contract types but not others (i.e. reuse varchars/dates etc and dynamically plot their labels for each contract type)? In this model there would be an innate limitation on how many fields could actually be used for each template (unless I build table modifiers into each template).
2.. Have one table that stores the common information and then a further table for each contract type, and use some javascript or multiple page interaction on the front-end to display the right field types to the user
3. Concatenate all the field and values and insert them into a text field in a separate table and conduct full text searches against this field?
Even as I type this I’m leaning more heavily towards the second option. However, I’m certain that this structural problem has been met and overcome countless times before and I’d be grateful for any views or insights that you may have.
Thanks
Justin