The only thing I am trying to solve is updating the database with one query instead of (1 to N) number of insert queries depending on how many "items" are listed.
- The database must contain a record of answers made by all users- Every "Item" has 4 answers associated with them, (for now...)- There can be any number of "items" listed on a single survey page (in this screenshot, I only show 3 items, but there may be up to 20 or 30 items that have to be listed)- "Value Saved" has a HIDDEN constant that gets calculated with the "Test Value" entered.
In this article I will show you the most common methods of using the UPDATE statement.
For all helpful answers below, show this by clicking on the thumbs up next to those answers.
The problem I find with that structure is there are at the same time an variable number of questions and an variable number of answers plus multiple answers for a single individual that need to be recorded. Unfortunately, I was tasked to present the survey in the format shown in the screenshot below, which is why I chose to design the table structures the way I did.
Thing is, there have been no concerns about normalization as I have had no problems with data insertion, querying results, reporting the answers, association of answers with members, etc!
;) table_foobar ( foobar_id, member_id, question_id, answer One, answer Two, answer Three, answer Four ) //Multiple questions for a single foobar Main survey.
tbl_foobar Question ( question_id, foobar Main_id, foobar Question ) tbl_foobar Main ( foobar Main_id, foobar Name, foobar Description ) your database is not normalised as was mentioned before.