From: | "Guido Barosio" <gbarosio(at)gmail(dot)com> |
---|---|
To: | "Sean Davis" <sdavis2(at)mail(dot)nih(dot)gov> |
Cc: | operationsengineer1(at)yahoo(dot)com, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Schema Questions |
Date: | 2006-02-23 21:45:05 |
Message-ID: | f7f6b4c70602231345s11bd9838r679b2e30f51156d7@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
A common production example on several databases that I manage (pretty
lammer, I admit):
Two schemas exists where:
schema A: the place where I write the data
schema B: a collection of views JUST READING schema A.
This allows me to create users and map them directly against the schema I
expect them to browse and use.
ie:
write_user: mapped against schema A
read_only_user: mapped against schema B
happy design!
g.-
On 2/23/06, Sean Davis <sdavis2(at)mail(dot)nih(dot)gov> wrote:
>
>
>
>
> On 2/23/06 12:06 PM, "operationsengineer1(at)yahoo(dot)com"
> <operationsengineer1(at)yahoo(dot)com> wrote:
>
> > hi all,
> >
> > i just read the pgsql manual schema section
> >
> > http://www.postgresql.org/docs/8.1/interactive/ddl-schemas.html
> >
> > and i have a couple questions.
> >
> > 1. the first reason listed for using schemas is...
> >
> > "To allow many users to use one database without
> > interfering with each other."
> >
> > i don't quite understand this statement. does this
> > assume that users will be divided between schemas,
> > thereby reducing the load on a given schema? i'd
> > appreciate it if someone could clarify what is meant
> > here.
>
> Not exactly. It just means that one user can create a table called
> mytable
> and another user in a different schema can create a table called mytable,
> and they will both exist happily, as a simple example.
>
> > 2. would using schemas be a good approach to separate
> > out public data from private data? for example, does
> > it make sense to create a schema for private data and
> > another for public data (with a different user)?
>
> Yep. That could be done easily.
>
> Sean
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
--
/"\ ASCII Ribbon Campaign .
\ / - NO HTML/RTF in e-mail .
X - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2006-02-23 22:45:23 | Re: check problem |
Previous Message | operationsengineer1 | 2006-02-23 19:21:58 | Re: reinstallation of Posstgresql 8.0 program |