Re: Design Database, 3 degrees of Users.

From: Marc Munro <marc(at)bloodnok(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 23:58:07
Message-ID: 1249084687.19113.59.camel@bloodnok.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2009-07-31 at 08:38 -0300, pgsql-general-owner(at)postgresql(dot)org
wrote:
> Date: Fri, 31 Jul 2009 12:38:30 +0100
> From: Andre Lopes <lopes80andre(at)gmail(dot)com>
> To: pgsql-general(at)postgresql(dot)org
> Subject: Design Database, 3 degrees of Users.
> Message-ID:
> <18f98e680907310438o764e9bc7hbb6e245d8464792(at)mail(dot)gmail(dot)com>
>
> 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.
>
>
> Wich the best way to implement this in PostGreSQL? There is some
> database
> examples doing this? Some OpenSource Project?

If I understand your requirement, I think you are hoping to implement
Virtual Private Databases for each of your users. With a VPD each user
connects to the same database but can see different subsets of data.

You can do this with veil:
http://veil.projects.postgresql.org/curdocs/index.html

Note that this is a hard problem and good solutions, even using veil,
require a lot of work. My advice to anyone thinking that they want to
do this is, consider very carefully whether the benefits of a VPD are
worth the cost. It is generally much easier to place the sort of
controls you need in your application than in the database.

__
Marc Munro (developer of veil)

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2009-08-01 01:16:26 Re: Can I have a look at your TuningWizard generated config file?
Previous Message Tom Lane 2009-07-31 23:09:53 Re: building a binary-portable database