Click here to Skip to main content
16,016,770 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Am developing a social networking site in ASP, i hv an option for create group page,am confused what to keep in the database when the user clicks on create group button i.e how to store the group members........plz help
Posted

1 solution

For this, you have to keep the MemberId (user ids) against the GroupId in one table.

When user will click on Create Group option, you will be asking him/her to select his existing friends to add in the Group.

When he/she submits the form, then you will store the UserID of all the selected friends as the MemberID in the Groups table against the GroupID of that Group, which can be one Autogenerated field.
 
Share this answer
 
Comments
Himu from Orissa 21-Sep-12 3:53am    
How many fields should i have in my group table
You can have as follows...

A. For Group Table

1. GroupID
2. GroupName
3. CreatedOn
4. ModifiedOn
5. CreatedBy
6. ModifiedBy
7. Owner
8. IsDeleted

B. For GroupMembersMapping Table

1. GroupID
2. MemberID -->UserID of Member

This is just an example of Table and fieds I can currently think of. It depends upon your requirement how many fields and what type of fields you need.
You may need more fields than these.

Thanks...
Himu from Orissa 21-Sep-12 5:12am    
Thanx for your response
Thanks for accepting the answer...
Himu from Orissa 21-Sep-12 4:56am    
What will be the primary key for the GroupMembersMapping table

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900