Any field type will work, though the most logical choice would be the one that requires the least amount of space. You could store each field in the table seperately - a field either has value (true) or not (false.) This is the option presented by the first answer you received.
Another option would be to assign a single string field in your table, capable of holding up to 3 different characters. On your GUI, if a user selects a field-option, the associated character is concatenated into your string-field on the table, so a value in the options-field "ADF" means that the 1st, 4th, and 6th options were selected.
Seeing as how you are limiting your user to no more than 3 options, your field doesn't need to be able to display any single number higher than 987 (ie: only the 10th, 9th, and 8th options selected,) so whatever numeric field goes that high in your database would likely be more efficient than 10 boolean fields or a 3 character string field.
2007-03-12 04:49:38
·
answer #1
·
answered by Anonymous
·
1⤊
0⤋
From your question i can see that you are asking which object type do i store the Form field in ? Am i right ?There are many ways. You can make a Varchar2(200) column and put all the options in the same column with some delimiter.When loading the form from the Database ,analyze the value and highlight those options.When modified or deleted you can update the column with the same.
Another Option is to denormalize you database to store it as child -parent relationship .For eg in the Parent you have only the id based on which you open the form. In the Child table you create id and Option columns both of which act as the primary key to the database, Thus Modifying options will modify the child table and loading form would mean a join query with all options obtianed, Thought this is the best option in case of designing principles depends on your willingnesss to COOODE .
2007-03-12 04:42:50
·
answer #2
·
answered by Satya 3
·
1⤊
0⤋
You will need to have all those options as boolean. for example the 10 options you have will be boolean fields in the table. and if the user selects three then the value for the three fields will be 1 and the rest will be 0.
2007-03-12 04:36:06
·
answer #3
·
answered by NeevarP M 3
·
2⤊
0⤋
locate your greatest answer, count quantity what number characters this is, and make it a varchar of that many. merely in view which you decrease the respond interior the database would not make it immediately decrease on the form. this is if your making a extensive undertaking. if your questioning that your database will contain decrease than one thousand entries, you are able to merely make it something like varchar(200) with out dropping too plenty area. you additionally could make it a set. those could be setup like this: set('a', 'b', 'c') the place a, b, c are the only desirable inputs.
2016-12-14 17:08:23
·
answer #4
·
answered by zagel 4
·
0⤊
0⤋
SQL doesnt really give much info, MySQL or MSSQL or what? there are many different database servers, but how about a small text field
2007-03-12 04:51:12
·
answer #5
·
answered by jamie w 2
·
0⤊
0⤋