Re: What is the benefit of schemas?
От | Mikael Carneholm |
---|---|
Тема | Re: What is the benefit of schemas? |
Дата | |
Msg-id | 1044309238014030@lycos-europe.com обсуждение исходный текст |
Ответ на | What is the benefit of schemas? ("Berend Tober" <btober@computer.org>) |
Список | pgsql-general |
> ------- Ursprungligt meddelande ------- > > Från: Berend Tober <btober@seaworthysys.com> > Datum: Mon, 3 Feb 2003 16:28:43 -0500 (EST) > > > why would you have your customers in a >separate database from an application table that had to reference the >customer ID primary key value (CustomerID) from a differnet database? It's more the other way around: why would you like to have tables for different applications in the same database? Over time,you will get more and more applications and more and more tables, and (talking pre 7.3), the only way to get referentialintegrity was to put all tables in the same database. Post 7.3, you no longer have to put tables in the same databasein order to re-use data from your previous apps. I demonstrated the pre 7.3 "no referential integrity while keeping it well organized" issue in my first reply by doing twoseparate connections to two different databases, as that's how you had to do it previous to 7.3 if you wanted to keepthings tidy. As a former Oracle developer, I can tell you that schemas are a essential part of reusability (in Oracle, at least), andI'm very happy that Postgres now provides the same functionality. A good design (IMHO) is to have a 1-1 relationship between app-db-schema-dbuser, i.e. appFoo connects as userFoo to dbFooand uses tables in the schemaFoo schema. New applications gets new users, new databases and new schemas, and are grantedusage to objects in other databases through the use of schemas. Reusability is the keyword! _____________________________________________________________ Här börjar internet! Skaffa gratis e-mail och gratis internet på http://www.spray.se Träffa folk från hela Sverige på ett och samma ställe - http://chat.spray.se/
В списке pgsql-general по дате отправления: