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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general