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

From: x <x_at_not-exists.org>
Date: Wed, 14 Jun 2006 11:58:05 +0300
Message-ID: <e6oirs$b9u$1_at_nntp.aioe.org>


"phlip" <phlip2005_at_gEEEmail.com> wrote in message news:pan.2006.06.13.18.52.27.504834_at_gEEEmail.com...
> frebe73 wrote:

> > You don't change the name of a column by the same reason why you don't
> > change a method name in an interface.

> I change them each time their ... behavior ... migrates to something else.

Who is "their" ? The names, the columns ? What is this "behavior" ? "Behavior" of data ?

> Do you fear change?

Change is only an ilusion :-)

> > What is the benefits with changing a
> > column name?

> Sometimes I make mistakes, and give something a name that's less than
> ideal. So I want to fix my mistake. Even if the name is in a database.

How can a name be a mistake ?
Are you talking about name clashes ?

> Maybe mistakes with databases are harder to fix than other mistakes.

Then again maybe they are easier.
All logical mistakes are BIG mistakes regardless of the place they occur. Do you suggest that databases are "more logical" than applications ?

> > If you really need to change column (or table) names, I
> > suggest the use of constants while building your SQL statements,

> What if I get the constant's name wrong too?

What if you get it all wrong too ?

Take this example:
min(x,y) if (x<y) return x; else return y;

Rename x y and min with anything you like as long as you keep them distinct identifiers and replace all occurences. You will not change anything. Then rename < ( , ) if < return ; else with something else and you screwed it if you also changed the meaning, not just the name.

> (The secret word here is "view", guys...)

Or synonyms/aliases. Received on Wed Jun 14 2006 - 10:58:05 CEST

Original text of this message