Re: Schema Questions

Поиск
Список
Период
Сортировка
От Guido Barosio
Тема Re: Schema Questions
Дата
Msg-id f7f6b4c70602231345s11bd9838r679b2e30f51156d7@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Schema Questions  (Sean Davis <sdavis2@mail.nih.gov>)
Список 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@mail.nih.gov> wrote:



On 2/23/06 12:06 PM, "operationsengineer1@yahoo.com "
<operationsengineer1@yahoo.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@postgresql.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 .
/ \ -----------------------------------------------------------------

В списке pgsql-novice по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: reinstallation of Posstgresql 8.0 program
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: check problem