Re: multi-company design/structure ?

From: John <jfabiani(at)yolo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: multi-company design/structure ?
Date: 2009-10-20 18:45:41
Message-ID: 200910201145.41963.jfabiani@yolo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 20 October 2009 10:11:53 am Wolfgang Keller wrote:
> > Is it better to create multi databases or create multi schemas?
>
> You're missing one option imho: One database, one schema.
>
> > I am writing a program that can have multi instances. Sort like a
> > finanical accounting system that can have multiable companies. Where each
> > company has a different name but the tables are an exact match to each
> > other.
>
> Then you could simply add a "company-id" column to every table (and make
> this column part of the primary key of each table). And if you run multiple
> instances of the program within _one_ company, then you can also add an
> "instance-id" column (and make this column also part of the primary key of
> each table).
>
> Sincerely,
>
> Wolfgang

I never even considered using the one database with added company
field/column. On the surface is sounds OK but I'm not to sure. Each SQL
statement would require company_id. Hmmmm.

Johnf

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2009-10-20 18:59:54 Re: multi-company design/structure ?
Previous Message Alban Hertroys 2009-10-20 17:29:07 Re: PostgreSQL driver for Joomla review