Re: Integrity on large sites
От | Alexander Staubo |
---|---|
Тема | Re: Integrity on large sites |
Дата | |
Msg-id | 88daf38c0705231043t4082b34atf588aea54b6d2fb@mail.gmail.com обсуждение исходный текст |
Ответ на | Integrity on large sites (Naz Gassiep <naz@mira.net>) |
Список | pgsql-general |
On 5/23/07, Naz Gassiep <naz@mira.net> wrote: > "*Really* big sites don't ever have referential integrity. Or if the few > spots they do (like with financial transactions) it's implemented on the > application level (via, say, optimistic locking), never the database level." It's not just the big ones. Try using Ruby on Rails -- and its ORM, ActiveRecord -- at some point, and you will notice the rampant ignorance of referential integrity. ActiveRecord bears signs of having been designed for MySQL. For example, you need a plugin to add programmatic support for foreign-key declarations to your schema code, and foreign key relationships have to be explicitly defined using directives such as "has_many". The unit test framework assumes it can delete rows in any order, irrespective of foreign-key references. And so on. Interestingly, ActiveRecord's support for polymorphic object associations -- which allow you define a reference to an object in an arbitrary table -- violates RI *per definition*. There's no support for setting up the check constraints that would be appropriate for such attributes. All the more annoying, since such associations are extremely useful. Alexander.
В списке pgsql-general по дате отправления: