Re: schema or database

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: schema or database
Дата
Msg-id DC7F4B72-80F3-4D2E-A818-4CEBEA9C3ECA@gmail.com
обсуждение исходный текст
Ответ на Re: schema or database  (Ian Barwick <ian@2ndquadrant.com>)
Ответы Re: schema or database  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
> On 13 Apr 2015, at 4:20, Ian Barwick <ian@2ndquadrant.com> wrote:
>
> On 13/04/15 11:08, Michael Cheung wrote:
>> hi, all;
>>
>> I am new here. And I need some suggestion.
>>
>> I have many similar database to store data for every customer.
>> Structure of database is almost the same.
>> As I use same application to control all these data, so I can only use
>> one database user to connect to these database.
>> And I have no needs to query table for different customer together.
>>
>> I wonder which I should use, different shema or different database to store data?
>>
>> I 'd like to know the advantage and disadvantage for using schema or database.
>
> If as you say access to the database is via a single application database
> user, it will probably make more sense to use multiple schemas rather than
> multiple databases. Keeping everything in one database will simplify
> administration (e.g. making backups - ypu'll just need to dump the one database
> rather than looping through a variable number) and will make life easier if you
> ever need to do some kind of query involving multiple customers.

That's easier to backup, sure, but you can't restore a single customer's schema easily that way. So if one customer
messesup their data big time, you'll need to restore a backup for all customers in the DB. 

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



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

Предыдущее
От: Sameer Kumar
Дата:
Сообщение: Re: Limiting user from changing its own attributes
Следующее
От: John R Pierce
Дата:
Сообщение: Re: schema or database