[Ilugc] mysql optimization

  • From: codeshepherd@xxxxxxxxx (Deepan Chakravarthy)
  • Date: Thu Jul 15 21:31:28 2010

Hi All,

I need some help in creating the best possible table schema for the
following condition.

There is a competition where people are allowed to signup in groups.
Each group has a groupid, each user has a uid, each group has  group
specific data like group_question_id etc. A single user can be part of
multiple groups. Each user can answer the group question with
group_answer_uid. The number of group_answer_uid (s) for user is equal
to number of groupid is he is part of.

Data
====
1)groupid
2)uid
3)group_question_id (specific to each group)
4)group_answer_uid (specific to each group for each user)

Following queries have to be made.

1)list all groups the user is part of
2)list all users in a groupid
3)list all group_answer_uids for a given group


What is the best schema possible for this?


Regards
Deepan

+91 9945702482
http://www.hashcube.com
http://twitter.com/codeshepherd

Other related posts: