D
dfa_geko
Hi Everyone,
This is just a simple application design question. I was just wondering how
different people would approach this problem.
Suppose you had to design a form where you edit a record and in the form
there is a list box. You can select multiple items in the list box that are
tied to that record. (Say for example, suppose you have a record that's a
car. You can select multiple options related to the car. power locks, power
windows, automatic transmission, etc) It would be a 1 - n relationship.
In the database, you have a master record in table A. (The car) And
multiple records in another table B with a foreign key relationship. (The
options on the car)
When a user submits the form. (Or clicks a button, whatever you wish) How
would you attack this problem? Delete all the records in table B and insert
the new records. Or would you compare the values of the list box and table
B and update accordingly?
Which is the better design approach?
Thanks!
dfa_geko
This is just a simple application design question. I was just wondering how
different people would approach this problem.
Suppose you had to design a form where you edit a record and in the form
there is a list box. You can select multiple items in the list box that are
tied to that record. (Say for example, suppose you have a record that's a
car. You can select multiple options related to the car. power locks, power
windows, automatic transmission, etc) It would be a 1 - n relationship.
In the database, you have a master record in table A. (The car) And
multiple records in another table B with a foreign key relationship. (The
options on the car)
When a user submits the form. (Or clicks a button, whatever you wish) How
would you attack this problem? Delete all the records in table B and insert
the new records. Or would you compare the values of the list box and table
B and update accordingly?
Which is the better design approach?
Thanks!
dfa_geko