On Fri, 2009-07-31 at 08:38 -0300, pgsql-general-owner@xxxxxxxxxxxxxx wrote: > Date: Fri, 31 Jul 2009 12:38:30 +0100 > From: Andre Lopes <lopes80andre@xxxxxxxxx> > To: pgsql-general@xxxxxxxxxxxxxx > Subject: Design Database, 3 degrees of Users. > Message-ID: > <18f98e680907310438o764e9bc7hbb6e245d8464792@xxxxxxxxxxxxxx> > > 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) -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general