in Question_Answers ... you would also want an 'Answer'
Main Topics
Browse All TopicsI need some design help for my database to manage a special kind of messaging system. its structured by sessions. Each session has 5 questions. So user one might initiate a session with user 2, with 5 simple questions simplified:
Whats your fav color? why?
where were you born?
etc..
user one sends the questions, with his answer already noted. Then user two puts his answers to each question and it is sent back, which user one can reply if he/she desires. Basically like a message thread of each question, but each one group by 5. I need each thread or session to be visible to under each user's account. I need help on an efficent structure for the database to keep track of all this data.
Can anyone offer any suggestions?
Each question has to be saved individually and asked to the responder. Then a message thread can initiate..
Table Sessions
_______________
I've gotten this far but I need something to organize the responses individually based on the question. The site asks the questions manually and individually rather than just pasting them up there and being an actual message board. Here is what I've come up with, please let me know if you can make it more efficent: (assume all answers are colors)
A Column:
Session ID: Primary key
userone e-mail: example@dot.com
usertwo e-mail: example2@dot.com
Questions asked: 12, 15, 19, 22, 10 (question numbers from another table)
Userone Answers: red10901blue10901green1090
Usertwo Answers: green10901pink10901purple1
Conversation timestamps userone: 11/27/05, 12/30/05
Conversation responses userone: Thats interesting, I agree (answers seperated by comma, will be matched up with data)
Conversation timestampes usertwo: 11/28/05, 12/31/06
Conversation responses usertwo: blah blah, blah
Somehow it seems inefficent.. Like all the seperators and array processing that must occur.. Any suggestions to avoid the need for array seperators would help a lot..
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: ThaSmartUnoPosted on 2006-07-09 at 19:15:26ID: 17070220
Table 1: (User)
UserID (PK, autoincrement)
SessionID
Table 2: (Email)
EmailID (PK, autoincrement)
UserID (FK)
Email
Table 3: (Questions)
QuestionID (PK, autoincrement)
Question
Table 4: (Question_Answers)
AnswerID (PK, autoincrement)
QuestionID (FK)
UserID (FK)
Table 5: (Converstation)
ConversationID (PK, autoincrement)
UserID (FK)
TimeStamp
Response
This is my suggestion