Re: *Proper* solution for 1..* relationship?

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: *Proper* solution for 1..* relationship?
Date: 2013-05-02 15:53:35
Message-ID: 1367510015748-5754086.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Wolfgang Keller-2 wrote
>> Please, someone espouse the practical benefits of enforcing that one
>> record exists on the child table in order for a record to be present
>> on the parent.
>
> In case of e.g. medical information systems, or in my case, maintenance
> information systems, quite a few people's lives could depend on the
> integrity of the data in the database. A correct data model is one
> necessary prerequisite for data integrity.
>
> Is that not enough of an incentive, to not practise homicide (murder?)
> by pure lazyness/ignorance/incompetence?
>
> Sincerely,
>
> Wolfgang
>
> P.S.: I would have expected people with such an obscene attitude ("why
> care for data correctness") on a list for Access or similar crapware,
> but not on a list for PostgreSQL.

Not every "0..*" relationship is necessarily wrong; nor is every "1..*"
relationship necessarily correct. Since you have not provided any examples
of why you MUST have a 1..* relationship and why 0..* is doomed you haven't
really said anything of meaning. I would argue that in many cases parents
can rightly exist without children and so 0..* is the natural model in life.
A menu with no options, An invoice without an line-items, a biological
parent without any offspring.

Your general tone for this entire thread, and this response to my posting in
particular, is quite offensive. Given that there is a way to implement 1..*
when it is needed, and the fact that I would posit that many applications
either truly model 0..* or, in the few instances where 1..* would be more
correct, the risk taken on by using 0..* is negligible compared to the cost
of modelling said restriction, the status quo is understandable.

i would much like to hear situations where those risk factors are not
negligible for models that are truly 1..*.

I have attempted to explain, with limited knowledge of history, why the
feature that you wish for does not currently exist. In short, the cost of
non-implementation has not yet outweighed the effort that would be required
for implementation. Either explain (or contribute) to decrease the apparent
effort involved or explain (in detail) why the cost of non-implementation is
greater than what others suppose it is. Railing against prevailing wisdom
and the decisions that people have made over the last 40 years - not to
mention insulting others - is a waste of effort that would be better spent
crafting a more detailed message.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Proper-solution-for-1-relationship-tp5753384p5754086.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Kevin Grittner 2013-05-02 21:02:57 Re: *Proper* solution for 1..* relationship?
Previous Message Richard Broersma 2013-05-02 15:41:06 Re: *Proper* solution for 1..* relationship?