Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database design question...

Status
Not open for further replies.

kasuals

Programmer
Apr 28, 2002
100
US
I am building an online community for work. I am not new to MySQL, however I am new to the design aspect in regards to large scale implementation.

What I need to do is build a database of groups, members and the communities they belong to.

Something like: group->community->member

The groups are static, in which they are selected by members to place their community in, however they cannot create their own group.

Should I:

Create a database that holds a table of all communities and their corresponding ID for fast searches and listing. Then create a database for that community that contains a table for their members and a table for the community preferences.

So far that is the only way I can see to accomplish this. I know I'm ranting and I may be jumping around a bit, but I have alot of information brewing in my head. =)

So basically the databases would look something like:

[Community ]
[-----------]
[communities]->[cID, name, group]

group_communityname (The database will be created with the group and community name, ie: group1_testgroup. Which will also be the communities cID so I can access the proper database for that community)

[group1_testgroup]
[----------------]
[preferences ]->[whatever happens to go here]
[members ]->[name, etc]

Would this be the most effecient way of doing this?

I need to be able to split them by group, and make the database easily searchable for community names when I list them in searches, which is why I created a master list in the beginning.

Is this ineffecient? Am I looking at this all wrong?

I don't mind creating as many databases as I have communities, because I need tables for each one and a members table for each one. I figured this would be the cleanest way to maintain such information.

Any comments would be more than welcome.

Hopefully I'm making some sense.

- "Delightfully confusing..." raves The New York Times

-kas
 
hello
your database issue is simple
just do some research on how to setup foreign keys.
it seems like you need 3 tables in one database with foreign keys pointing to the different tables
then all you have to do is joins in your selects to make it all come together.
by the way i just came across a free pgm called mysqlstudio that might make this easy for you
good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top