From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Understanding Schema's |
Date: | 2010-12-15 00:17:28 |
Message-ID: | 1292372248.10927.1751.camel@jd-desktop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 2010-12-14 at 19:08 -0500, Carlos Mennens wrote:
> I've recently switched from MySQL & have read the documentation for
> 'schema's' however I guess I'm just not at that level or really daft
> when it comes to database design.
>
> http://www.postgresql.org/docs/current/static/ddl-schemas.html
>
> I'm trying to understand the relation between actual databases &
> tables but can't grasp the relation with schema's so I was wondering
> if someone has an easy way of explaining this beyond the documentation
> I linked above. I notice my fresh 9.0 install has a default schema
> called 'public' which every newly database I create defaults to and I
> also created two new schema's called 'fire' & 'ice' but from what I
> have written above, obviously I don't have any understanding of how
> they work.
>
> I greatly appreciate any info and or help since I appear to be lost.
It works like this:
cluster/catalog->[N]_Databases->[N]_Schemas->[N]_Objects
You can cross query a schema but not a database.
So you can create:
create table fire.foo()
create table ice.foo()
And they are isolated from each other physically and logically but you
can query them both:
SELECT fire.*, ice.* join on (id)
(psuedo SQL of course)
Sincerely,
Joshua D. Drake
>
> -Carlos
>
--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt
From | Date | Subject | |
---|---|---|---|
Next Message | Carlos Mennens | 2010-12-15 00:20:37 | Re: Understanding Schema's |
Previous Message | Carlos Mennens | 2010-12-15 00:08:33 | Understanding Schema's |