Re: "Structured" Entity-Relationship Model?

From: Jan Hidders <hidders_at_gmail.com>
Date: Tue, 30 Apr 2013 23:48:26 +0200
Message-ID: <51803c2a$0$26889$e4fe514c_at_dreader37.news.xs4all.nl>


On 2013-04-30 14:30:54 +0000, Wolfgang Keller said:

>> 
>> Using the SERM example on the wikipedia page, the graph says every
>> order has N order items, and every order item has 1 order.  Although
>> drawn as just one line, that line states two rules, mutually
>> dependent: a cycle.  (Try using DRI to enforce them.)

>
> And just two (mutually co-dependent) constraints wouldn't be enough
> to correctly implement the semantics, as far as I understand. But
> database design books don't seem to explain it either. At least those
> that I have access to. Or am I just blind?
>
> This issue (it's "just" a 1:n relationship with n>0, right?) must be
> as old as the relational database model itself (fourty years now?).
>
> I've tried to google for the relevant terms, and couldn't find a
> documented example for a correct, tested solution. Or is it just that
> you need to know *the* terms to search for?
>
> Does someone in this group know of a book (or an online document) that
> shows how to *correctly* implement such things? And maybe one that also
> gets other things (that I haven't stumbled over yet) *right*? Something
> like "database design caveats that most textbooks conveniently ignore"?

Look for "deferred constraint checking". Oracle and PostgreSQL support that.

  • Jan Hidders
Received on Tue Apr 30 2013 - 23:48:26 CEST

Original text of this message