sql - Is it better to use fewer tables with more columns or vice versa? -
I am trying to figure out how to determine the best balance in organizing databases. I want to be able to store information from various different forms presented by different people, sometimes at times (such as annual updates). I am stuck between having a separate table for each form, or form and combination of element definition and element value table. Example A: There are three types of forms with different types, so each of the four tables, [form A], [formb] and [formaci] has data related to their respective form, in all the FK [customer]. Example B: There are three different types, but at this time there are five different tables [form description] defines the name, type, etc. of the form and it has three entries, one for each form . [Form] uses combination with the date of these submissions to differentiate between [customer] and [form descriptration] and individual submissions from FK. [Form elements] defines all elements from three forms, in which there is an FK and a unique element ID on form description. [Elementvallus] stores [form elements] and [value] from the FK and the value of the selected element on the selected form.
My question is, one of these methods is better than the other, and if not, in which circumstances are better than the other? No matter how much or why you want to join, it is appreciated.
"My question is that in these ways naturally is better than the other, and If not, what is better than the other in the circumstances? Why not or why not you want to be included in it, it is appreciated. "
Your choice is two (your personalized edition) EAV antipatan . If you use it, and you expect the system (now or later) to do anything "intelligent" with the data, you will find yourself in serious trouble and " Strict data validation to catch data entry errors "basically already pass as" intelligent "so only use it if you can reasonably guess that the system only < Only the stored data will be used for , and it will never be possible to request "intelligent way" to start processing / adding data.
If you ever run into the request to start "wise" things from the EAV database, then you will find that whatever development time you had felt by working with a super-duper generic information model To codify all "intelligent" things, you will occasionally lose the order of magnitude, that means restoring the data structure to the code that you refused to reflect on in DB.
Googling for "EAV Antipartran" (Try to find out the book by Bill Karwin) You should provide more information than enough information about doing this.
Comments
Post a Comment