relational database: how to design this table
Posted
by donpal
on Stack Overflow
See other posts from Stack Overflow
or by donpal
Published on 2010-04-26T02:49:31Z
Indexed on
2010/04/26
2:53 UTC
Read the original article
Hit count: 431
I'm a database newbie designing a database. I'll use SO to ask my question because it's easier to ask it on something that you can see already, but it's not the same, it will just help me understand the right approach.
As you can see, there are many questions here and each can have many answers. How should I store the answers in a table? Should I store all the answers in the SAME table with a unique id (make it the key) and just a new field for the question id? What if there are 100,000 answers like there is here? Do I still store them in 1 table? What keys should I use to minimize search time when I want to search for the answers of a specific question?
The database is both read and write if that makes any difference in this case.
© Stack Overflow or respective owner