Re: multi-company design/structure ?

From: Wolfgang Keller <feliphil(at)gmx(dot)net>
To: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: multi-company design/structure ?
Date: 2009-10-20 17:11:53
Message-ID: 20091020191153.d85497bb.feliphil@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> 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

--
NO "Courtesy Copies" PLEASE!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2009-10-20 17:24:52 Re: Count occurrences of pattern in string
Previous Message dario.ber@libero.it 2009-10-20 17:04:26 Count occurrences of pattern in string