Re: Relation in tables

From: lucas(at)presserv(dot)org
To: PFC <lists(at)boutiquenumerique(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Relation in tables
Date: 2005-02-17 10:57:25
Message-ID: 20050217075725.q7hlx6iv076okogk@www.presserv.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>
> Use a view per department, which show/hide the columns according to your
> liking. Give each department a schema and put everything related to it
> inside for cleanliness. Use UPDATE triggers on the views, which in fact
> write to the products table, so that the departments can only update the
> columns you like. You can even make some columns readable but not
> writeable, by raising an exception if a modification is attempted on that
> column.
>
> If you want to reuse your code between departments, you will want all the
> views to have the same columns, so make them return NULL for the fields
> that they cannot see.
>
> Finally don't forget to make the products table inaccessible the
> departments.
>

Okay, I will use Triggers to manage the insert and update table and viewers to
select records, but need I use more than one table (with inherits)? Or I just
use product table with the ALL departaments coluns and check the perms into
Triggers and Viewers???
Thanks

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message pginfo 2005-02-17 15:12:38 Re: pg primary key bug?
Previous Message AL ELK 2005-02-17 10:18:48 diff value retuns, debug mode and play mode