Skip site navigation (1) Skip section navigation (2)

Re: schemas for organizing tables

From: Darren Duncan <darren(at)darrenduncan(dot)net>
To: Seb <spluque(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: schemas for organizing tables
Date: 2011-04-29 02:29:11
Message-ID: 4DBA2277.2010907@darrenduncan.net (view raw or flat)
Thread:
Lists: pgsql-general
Seb wrote:
> A database I'm handling is becoming a bit large'ish (~ 30 tables), and
> I'd like to break them down into their natural units.  Schemas for each
> of these natural units seems logical, but are they really meant for
> this?  I'm also worried about how this would affect programs like
> Libreoffice (the sdbc driver in particular)?

I think that 30 tables is too few to be splitting into schemas based just on 
their number; you should have other reasons for splitting them.  Also, 30 is 
quite small, or at least medium-small; some databases have hundreds, thousands 
or tens of thousands of tables.

Think of a schema like a programming namespace.  In a program, you may have 
different libraries or classes that each contain functions and such.  You would 
logically group functions together at some times and separate them at other 
times.  You can let similar concerns organize your schemas, where as schema is 
like a library as a function is to a table ... or some other database object 
like a stored function.

-- Darren Duncan

In response to

Responses

pgsql-general by date

Next:From: SebDate: 2011-04-29 03:03:20
Subject: Re: schemas for organizing tables
Previous:From: SebDate: 2011-04-29 01:42:34
Subject: Re: schemas for organizing tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group