database design

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stijn Goris

    #1

    database design

    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


  • Geoff Berrow

    #2
    Re: database design

    I noticed that Message-ID: <41288509$0$414 2$ba620e4c@news .skynet.be>
    from Stijn Goris contained the following:
    [color=blue]
    > I have come up with some dbase design but
    >would like to see your optinion and hoping the design is more elegant.[/color]

    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/

    Comment

    • Average_Joe

      #3
      Re: database design

      In article <41288509$0$414 2$ba620e4c@news .skynet.be>, Stijn Goris wrote:[color=blue]
      > 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[/color]

      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

      Comment

      Working...