From: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
---|---|
To: | Andre Lopes <lopes80andre(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Design Database, 3 degrees of Users. |
Date: | 2009-07-31 18:46:22 |
Message-ID: | 4A733BFE.1070507@pinpointresearch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Andre Lopes wrote:
> I need to design a Database that will handle 3 degrees of users:
>
>
> Administrators - They can see all the information in the database.
>
> Managers - They only can see the information of his dependants.
>
> Dependants - Theirs action must be aprovet by the managers.
>
A little more description of your application would be helpful.
Are these users of the database directly or are they users who login to
something like a web-app to retrieve information?
In research, we sometimes deal with organizational trees. For example we
might have employee-satisfaction that must be made available to
thousands of managers, each of which is allowed to see the aggregate
data of her department and of any department below her but nothing above
her. If your situation is similar, you might look into using an
adjacency-tree (every record except the top has a "manager-id" pointing
to that person's boss) along with the new "with recursive" queries in 8.4.
Cheers,
Steve
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2009-07-31 18:49:47 | Re: Division by zero |
Previous Message | Greg Smith | 2009-07-31 18:43:10 | Re: Can I have a look at your TuningWizard generated config file? |