Re: multi-company design/structure ?

Поиск
Список
Период
Сортировка
От Ivano Luberti
Тема Re: multi-company design/structure ?
Дата
Msg-id 4ADEC4F6.2030501@archicoop.it
обсуждение исходный текст
Ответ на Re: multi-company design/structure ?  (John <jfabiani@yolo.com>)
Ответы Re: multi-company design/structure ?
Список pgsql-general
The problem is how you use those data ?
I have used schemas to split data when I had to manage large amount of
data (hundred of thousand records) that are (almost) never going to be
used together, if not for statistic purposes and offline processing.

If you never need to select those data all together (different companies
and instances access only their own data) and the amount is really large
than you can have benefit from splitting, otherwise adding a field is
going to be more efficient.

John ha scritto:
> 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
>
>
>
>

--
==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==================================================


В списке pgsql-general по дате отправления:

Предыдущее
От: Mike Christensen
Дата:
Сообщение: Re: Free Tool to design Postgres Databases
Следующее
От: "Sgarbossa Domenico"
Дата:
Сообщение: How to send multiple parameters to a pl/pgsql function