Re: Design Database, 3 degrees of Users. - Mailing list pgsql-general

From Rich Shepard
Subject Re: Design Database, 3 degrees of Users.
Date
Msg-id alpine.LNX.2.00.0907310643070.13077@salmo.appl-ecosys.com
Whole thread Raw
In response to Re: Design Database, 3 degrees of Users.  (bricklen <bricklen@gmail.com>)
Responses Re: Design Database, 3 degrees of Users.
List pgsql-general
On Fri, Jul 31, 2009 at 4:38 AM, Andre Lopes<lopes80andre@gmail.com> 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.
>
> Wich the best way to implement this in PostGreSQL? There is some database
> examples doing this? Some OpenSource Project?
>
> I'am designing a Database for doing this, but I don't have sure I'am doing
> well.
>
> Please give me some advice.

   You don't want to implement this in SQL, regardless of what DBMS you use
as the back end. Implementing different user classes (or roles as we call
them) is done in your middleware and UI.

   SQL is a set-oriented language for manipulating data stored in tables.
Your application code can specify the creation and use of VIEWS that depend
on the priviledges associated with each user when logged into the system. It
appears to me that you ought to take a step back and learn a bit more about
application development which uses a DBMS as a data storage back end.

Rich

--
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863

pgsql-general by date:

Previous
From: Ashesh Vashi
Date:
Subject: Re: Can I have a look at your TuningWizard generated config file?
Next
From: Jennifer Trey
Date:
Subject: Re: Can I have a look at your TuningWizard generated config file?