Re: Design Database, 3 degrees of Users.

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Design Database, 3 degrees of Users.
Date: 2009-07-31 13:47:47
Message-ID: alpine.LNX.2.00.0907310643070.13077@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jul 31, 2009 at 4:38 AM, Andre Lopes<lopes80andre(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ashesh Vashi 2009-07-31 13:47:48 Re: Can I have a look at your TuningWizard generated config file?
Previous Message Ashesh Vashi 2009-07-31 13:34:18 Re: How do I run PG Tuning Wizard on Linux?