Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)

From: Marshall <marshall.spight_at_gmail.com>
Date: 20 Jun 2006 11:55:15 -0700
Message-ID: <1150829715.563442.299850_at_p79g2000cwp.googlegroups.com>


Robert Martin wrote:
> On 2006-06-13 13:46:08 -0400, "Marshall" <marshall.spight_at_gmail.com> said:
>
> > <pained>
> > Table names, column names, etc. are *logical* constructs, not
> > physical ones.
> > </pained>
>
> There is both a logical and physical aspect to them. The names
> themselves are physical entities. In a program they will be
> represented by strings in ASCII or UNICODE. The data modeler may have
> used a physical convention like T_ as a prefix to all table names and
> C_ as a prefix to all column names. etc. etc.
>
> The fact that there is a many-many relationship between A and B is
> captured by a table with keys in it. This is -- physical.

By this definition, *everything* in the computer is physical. That is, you are saying that it is not possible to separate logical and physical concerns in a computer. For example, we can now draw no distinction between java.util.List, the interface, and java.util.ArrayList, the implementation; both are physical, because both have method names composed of characters. In essence you have destroyed the distinction that is the reason these terms exist, rendering them useless.

Instead of doing that, I think it makes more sense to use definitions that *do* allow for the distinction, since it's a quite important one. java.util.List is a logical construct; ArrayList is a physical one. Column names are logical; indexes are physical.

The fact that A and B have a many-to-many relationship is a conceptual fact. We logically model this conceptual relationship with a join table, which is a logical construct. This table may be implemented with a row store with an index, which is a physical construct.

Marshall Received on Tue Jun 20 2006 - 20:55:15 CEST

Original text of this message