Unix Technical Forum

Schema Questions

This is a discussion on Schema Questions within the pgsql Novice forums, part of the PostgreSQL category; --> hi all, i just read the pgsql manual schema section http://www.postgresql.org/docs/8.1/i...l-schemas.html and i have a couple questions. 1. the ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 09:37 PM
operationsengineer1@yahoo.com
 
Posts: n/a
Default Schema Questions

hi all,

i just read the pgsql manual schema section

http://www.postgresql.org/docs/8.1/i...l-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.

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)?

tia...

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------(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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 09:37 PM
Sean Davis
 
Posts: n/a
Default Re: Schema Questions




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/i...l-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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-17-2008, 09:37 PM
Guido Barosio
 
Posts: n/a
Default Re: Schema Questions

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/i...l-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 .
/ \ -----------------------------------------------------------------

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:22 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com