If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Opinions on a membership-sitemap diagram

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-28-09, 21:22
sohdubom sohdubom is offline
Registered User
 
Join Date: Feb 2009
Posts: 3
Opinions on a membership-sitemap diagram

http://www.freeimagehosting.net/uploads/8fe0c141cb.gif

Hi. The url above shows a diagram I'm working on in order to design a basic membership and sitemap diagram. Basically what I define as Membership is a User (John, Mary, etc) who belongs to one Department (Administrative, Finance, etc) that can have many Groups (admin, manager, etc) and a Group can have many Roles (create, view, delete, etc)

I'm differentiating Groups from Roles, considering roles as something a person can execute (an action)

I have 2 join-tables: Membership and Navigation

Membership: joins 3 tables (Role - Department - Group) because i'm considering that an admin from dept finance is different from an admin from another dept because they can have different roles (eventually they can have the same roles, but it's a coincidence)

Navigation: this join-table sets who can access a particular link (relative url path in a website)

I would like to see some opinions about that diagram. :-)
Reply With Quote
  #2 (permalink)  
Old 02-28-09, 23:11
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
opinions? okay, i like your use of colour



okay, seriously, it's hard to give an opinion on a proposed solution when we are still in the dark as to the requirements
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 03-01-09, 00:21
sohdubom sohdubom is offline
Registered User
 
Join Date: Feb 2009
Posts: 3
well, colors are great, but regarding requirements, let me try to explain:

1. the main reason i'm trying to design this membership - sitemap diagram is because independent of what kind of web app i usually develop, normally all of them requires managing users, assigning them into groups and then, according to which group he/she belongs to, control access to web pages and eventually what kind of operations he/she can execute (eg, view a report, create, etc) based on the roles a particular group have

2. sometimes in a more complex app i also need to differentiate a user or group by which sector/department he works, but normally the department is not really important, so the Department table/model could be eliminated or we could create a 'general' department and assign all users to this one.

3. the Navigation join-table could be de-normalized and instead i could add an extra column in the Links table (eg, members) and fill this field with coma separated membership_id values, so i know who can access that url, but i'm not sure doing that is a good idea?

I think by using that diagram, although i'll need to make use of several joins to get the needed data, it can solve most of the situations i generally face when developing wep apps ... i'm just a bit insecure about the diagram because i'm not used to designing db diagrams.
Reply With Quote
  #4 (permalink)  
Old 03-01-09, 03:12
dportas dportas is offline
Registered User
 
Join Date: Dec 2007
Location: London, UK
Posts: 732
Quote:
Originally Posted by sohdubom
http://www.freeimagehosting.net/uploads/8fe0c141cb.gif

Hi. The url above shows a diagram I'm working on in order to design a basic membership and sitemap diagram. Basically what I define as Membership is a User (John, Mary, etc) ...
There is no user_id in Membership. I don't understand how the diagram matches your definition.
Reply With Quote
  #5 (permalink)  
Old 03-01-09, 08:44
sohdubom sohdubom is offline
Registered User
 
Join Date: Feb 2009
Posts: 3
Quote:
Originally Posted by dportas
There is no user_id in Membership. I don't understand how the diagram matches your definition.
I believe the department_id in User is enough to tell me which users I have in a particular Department or even Membership, is that right?
Reply With Quote
  #6 (permalink)  
Old 03-01-09, 11:19
dportas dportas is offline
Registered User
 
Join Date: Dec 2007
Location: London, UK
Posts: 732
Only if the fact of a department_id appearing in Membership means that ALL users in that department always have a membership. That wasn't what I inferred from your description though.

It's virtually impossible to do effective design in an online forum. These threads often turn into a long list of questions and answers about the business domain that don't add up to anything very instructive.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On