Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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: Fri, 31 Jul 2009 16:58:07 -0700
  • Message-id: <1249084687.19113.59.camel@bloodnok.com> <text/plain>

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)





Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group