mysql - Dilemma about the number of columns on a table -


scenario:
creating website checklist, can done/accessed multiple users in same time needs fields editable, saveable , retrievable.

dilemma:
checklist has 212 entries, means 212 rows. have 5 columns needs entries thus, 212x5. means, have create 1060 columns able me code website want do. 1060 columns on table seems wrong , tiring use.

sample solution:
divide 5 columns 5 tables, making date checklist created primary key. use 5 tables corresponding columns reducing number of columns per table 212.

is there anyway reduce this? sorry long post, appreciated.

**edit: reason, can't comment on answers, says error on page. nevertheless, appreciate everybody's answer; yet have 1 info may change answers. have thought of making 5 columns instead of obnoxious 1060, doing that, need/the system need create 1 table per 1 worksheet , of course, on time, cause massive problems database.

although still pretty huge, ah_hau's answer seems smallest , easiest handle. using it, system create 217 entries per checklist, use 6-8 columns only. thank shed light dillemma, hope see guys again on next question. cheers!

why not directly add 1 more column in checklist table?

your table structure should like

  1. userid
  2. entryid (value 1-212)
  3. col1_entry
  4. col2_entry
  5. col3_entry
  6. col4_entry
  7. col5_entry

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -