By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,313 Members | 2,725 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,313 IT Pros & Developers. It's quick & easy.

database design

P: n/a
Hi all,

My website needs to order some groups (tblgroup). Groups hold users
(tblusers) and can hold other groups (so called subgroups). Users can be a
member of multiple groeps. Groeps can hold more than one user. There only
has to be one level of subgroups. I have come up with some dbase design but
would like to see your optinion and hoping the design is more elegant.

thanks
Stijn
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I noticed that Message-ID: <41**********************@news.skynet.be>
from Stijn Goris contained the following:
I have come up with some dbase design but
would like to see your optinion and hoping the design is more elegant.


I'll show you mine if you show me yours...
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2

P: n/a
In article <41**********************@news.skynet.be>, Stijn Goris wrote:
Hi all,

My website needs to order some groups (tblgroup). Groups hold users
(tblusers) and can hold other groups (so called subgroups). Users can be a
member of multiple groeps. Groeps can hold more than one user. There only
has to be one level of subgroups. I have come up with some dbase design but
would like to see your optinion and hoping the design is more elegant.

thanks
Stijn


Thats fairly straight-forward. My package allows multiple groups pr.
user, but doesn't do the subgroup thing. (No real need for it, why do
you need subgroups?)

Just add a "parent-id" column to your group table, using 0 as "no
parent". Then groups can be nested as far as you like. (Simply "travel
up" the parent tree until you get to 0)

For speed, or relational joins, you'll probably want another table of
subgroups, however.

Jamie
--
http://www.geniegate.com Custom web programming
User Management Solutions Perl / PHP / Java / UNIX

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.