Re: postgresql table inheritance

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: postgresql table inheritance
Дата
Msg-id 1196450236.22428.386.camel@dogma.ljc.laika.com
обсуждение исходный текст
Ответ на Re: postgresql table inheritance  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: postgresql table inheritance
Список pgsql-general
On Fri, 2007-11-30 at 16:06 +0000, Gregory Stark wrote:
> "Lincoln Yeoh" <lyeoh@pop.jaring.my> writes:
>
> > The correct way to store types and subtypes in the database is to store them
> > in the columns. In other words, choose attribute VALUES from a TYPE SYSTEM.
> > Nothing else in the relational model needs to be changed. Something like
> > this, in hypothetical SQL-like language:
>
> That's what we call "denormalized" data in the database world. This is why
> there's such a big impedance mismatch between procedural languages and
> relational databases.
>

CJ Date believes that normalized relations can indeed contain complex
types such as images or other relations.

The argument is that atomicity has no absolute meaning, but only has
meaning in the context of what you're trying to do with it in the
database. A string can obviously be decomposed into its parts, as can a
timestamp, etc., so those aren't exactly atomic, either. [1]

The impedance mismatch has more to do with the fact that the meaning of
an application's internal data structures changes frequently (through
revisions of the code), while data in a database needs to be consistent
across long periods of time. So, a well-designed database will hold
facts that have meaning in the real world and from which inferences can
be made. Mapping application data structures (which contain context-
sensitive information and implementation artifacts) to real-world facts
is the impedance mismatch.

Regards,
    Jeff Davis

[1] Paraphrased from "Database in Depth", C.J. Date, pp 29-32


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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: PL/pgSQL and SETOF
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: postgresql table inheritance