Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / General DB Topics / DB Theory / June 2008

Tip: Looking for answers? Try searching our database.

pro- foreign key propaganda?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sinister - 15 May 2008 11:27 GMT
I'm supervising the development of a database system with a web interface.

I had built the DB backend using postgresql.  The guy we hired to take over
the project from me---I have non-IT duties to attend to---for various
reasons decided to switch to MySQL and created his own tables (as well as
redoing the web interface).

After a conversation involving two tables which I thought ought to be
connected by a foreign key relationship, I went and checked his DB; I was
worried that he didn't fully understand the importance of using foreign
keys.  So I ran mysqldump and then did "grep -i foreign dump.sql" and
"grep -i references dump.sql."  Nothing!

So...sent him an email late in the day, stressing that it's important that
foreign keys be used where possible, that as much of the model
logic/business logic/whatever should be encoded in the database itself to
ensure data integrity, and so on.

What do I do if he gets back to me and says---as I'm sure everyone in his
position does---"oh, but my PHP code makes sure everything is done right"?
Not that I don't know what to say, but it would be good to have a pointer to
an essay or webpage that succinctly explains why you're asking for trouble
if you don't encode such relationships in the DB itself.

Sure, I could say, "Your next assignment is to read a book on DB theory, and
give me a 10 minute summary," but we don't have that much time...

:-(
Bob Badour - 15 May 2008 14:45 GMT
> I'm supervising the development of a database system with a web interface.
>
[quoted text clipped - 24 lines]
>
> :-(

If he is that much of a newb, make sure he is not using MyISAM. Maybe he
didn't declare any integrity because he doesn't think mysql will enforce
it in any case. But MyISAM can (will?) corrupt your data.
sinister - 15 May 2008 20:28 GMT
>> I'm supervising the development of a database system with a web
>> interface.
[quoted text clipped - 29 lines]
> didn't declare any integrity because he doesn't think mysql will enforce
> it in any case. But MyISAM can (will?) corrupt your data.

I actually told him at the beginning to use InnoDB---because MyISAM doesn't
enforce fk constraints---and thankfully enough he did do that.

MyISAM and corruption---due to lack of constraint enforcement, or because
it's buggy?

In the previous version of the project we're working on, the guy (not the
same one) was using Microsoft Access.  A pretty important table got
corrupted, in the sense that for about 20% of the rows, half of the row
really belong with another row.  (Meaning, there's a name and a record
number assigned by another dept, and in those 20%, the rec num wasn't just
incorrect, it belonged to another name in our table, even though we have
about 2000 names, and the dept providing the rec num has at least tens of
thousands, so it can't be just wrong randomly.)  There was another data
source in the form of an Excel table (this is when I was trying to clean up
the data and put it in a nice PostgreSQL table), and they conflicted, and I
figured, "OK, Access isn't my favorite DB, but surely it must be because
someone took the Excel table and shifted some cells up and 'broke' the
rows."  Turns out Access was wrong!  I have no idea how _that_ happened.
Bob Badour - 15 May 2008 21:53 GMT
>>>I'm supervising the development of a database system with a web
>>>interface.
[quoted text clipped - 35 lines]
> MyISAM and corruption---due to lack of constraint enforcement, or because
> it's buggy?

Buggy

> In the previous version of the project we're working on, the guy (not the
> same one) was using Microsoft Access.  A pretty important table got
[quoted text clipped - 9 lines]
> someone took the Excel table and shifted some cells up and 'broke' the
> rows."  Turns out Access was wrong!  I have no idea how _that_ happened.

Using an end-user query tool as if it were a dbms is a recipe for disaster.
sinister - 16 May 2008 01:56 GMT
>>>>I'm supervising the development of a database system with a web
>>>>interface.
[quoted text clipped - 56 lines]
> Using an end-user query tool as if it were a dbms is a recipe for
> disaster.

LOL!

I agree.

Once I posted something like "Is Access a true RDMS?" on an access USENET
group, and got a huge amount of sh.t for it.

:-)
Marshall - 16 May 2008 15:36 GMT
> >> I'm supervising the development of a database system with a web
> >> interface.
[quoted text clipped - 35 lines]
> MyISAM and corruption---due to lack of constraint enforcement, or because
> it's buggy?

Both. I say from experience.

Marshall
paul c - 15 May 2008 15:41 GMT
...
> What do I do if he gets back to me and says---as I'm sure everyone in his
> position does---"oh, but my PHP code makes sure everything is done right"?
> Not that I don't know what to say, but it would be good to have a pointer to
> an essay or webpage that succinctly explains why you're asking for trouble
> if you don't encode such relationships in the DB itself.
> ...

It is usually pointless to argue technical points with ignorants, even
if they are well-meaning that will encourage even more wasteful work on
top of the existing mistakes.  The only argument I've ever seen succeed
was to tell management that certain features of the product it had
invested in were being ignored and that they were paying extra to code
those features in-house.  That is still a long-shot as most managements
are also too lazy or ignorant to pay attention to non-political issues.

By rights, the first argument ought to be that the slightest error in
the in-house code risks integrity for the whole installation but usually
who wins either of these two arguments is a matter of who has more of
mgmt's ear, so in practice it still comes down to politics.

Of course, if you're lucky enough to win either argument over the heads
of the ignorants, some of those will make themselves your enemies in
future, wherever you may go.  Having experienced all of the above over
many years, my attitude now would be to just try to get along with them
and plan to get out at the earliest opportunity, with your conscience
intact and your resume untarnished.  If it is a localized mundane
commercial application, eg., nothing to do with say, public safety,
life's too short for any other course.
sinister - 15 May 2008 20:32 GMT
> ...
>> What do I do if he gets back to me and says---as I'm sure everyone in his
[quoted text clipped - 11 lines]
> in-house.  That is still a long-shot as most managements are also too lazy
> or ignorant to pay attention to non-political issues.

Thanks for your reply.

It's actually just a relatively small DB for a group in a scientific
institute.  So very few people involved.  I sent the guy an email, and
instead of protesting (I'm informally supervising him), he said he did it
that way because it's awkward to have constraints because he's importing
lots of sloppy data from spreadsheets etc.  When I told him he _had_ to have
fk constraints, he yielded w/o complaint.  (Then I told him he could deal
with the sloppy data even w/ the fk constraints, in ways which aren't all
that cumbersome.)

One thought did occur to me---why did he think I had all those constraints
in my PostgreSQL table creation code?  Hmm...

Cheers

> By rights, the first argument ought to be that the slightest error in the
> in-house code risks integrity for the whole installation but usually who
[quoted text clipped - 9 lines]
> eg., nothing to do with say, public safety, life's too short for any other
> course.
TroyK - 15 May 2008 19:13 GMT
> I'm supervising the development of a database system with a web interface.
>
[quoted text clipped - 24 lines]
>
> :-(

You might try comparing the code required to declare the FK in the
database (i.e., a one-liner) to the code required to enforce the
constraint in PHP. Maybe then he can see which is more likely to
contain errors.

TroyK
sinister - 15 May 2008 20:33 GMT
> You might try comparing the code required to declare the FK in the
> database (i.e., a one-liner) to the code required to enforce the
> constraint in PHP. Maybe then he can see which is more likely to
> contain errors.

> TroyK

Thanks; that's a good idea.
Sabine Dinis Blochberger - 16 May 2008 09:46 GMT
> I'm supervising the development of a database system with a web interface.
>
> I had built the DB backend using postgresql.  The guy we hired to take over
> the project from me---I have non-IT duties to attend to---for various
> reasons decided to switch to MySQL and created his own tables (as well as
> redoing the web interface).

IMO, he shoulnd't have redone the database at all. What this tells me is
that he only knows MySQL and is unwillig to expand his knowledge to
other RDBMs.

> After a conversation involving two tables which I thought ought to be
> connected by a foreign key relationship, I went and checked his DB; I was
[quoted text clipped - 6 lines]
> logic/business logic/whatever should be encoded in the database itself to
> ensure data integrity, and so on.

Did you create an ERD? That might be an easy(er) way to explain it to
him.

> What do I do if he gets back to me and says---as I'm sure everyone in his
> position does---"oh, but my PHP code makes sure everything is done right"?

That is bovine excremental matter. He should know he is wasting his (and
his paycheck writers) time re-inventing a wheel that is already running
smoothly. <g>

> Not that I don't know what to say, but it would be good to have a pointer to
> an essay or webpage that succinctly explains why you're asking for trouble
> if you don't encode such relationships in the DB itself.

That's easy. Ask "What happens if someone accesses the database through
something different then the website?". Then all the "make sure" code is
rendered utterly useless.

Then there's the problem MySQL has with ttransactions - I don't know the
details, but seems there are some shortcommings.

> Sure, I could say, "Your next assignment is to read a book on DB theory, and
> give me a 10 minute summary," but we don't have that much time...

No time for education? Then they shouldn't hire newbies, sorry.
Beside, he already wasted time by re-doing your work. And if he keeps
the direction he's going, they are going to lose *alot* of time fixing
bugs when the system goes into production.

Our company, for example, was doing a database with web frontends for
workers and customers (for a real estate business). My boss started out
with dBase, and he also put the "safeguards" into code rather than the
db definition. Needless to say, it went downhill pretty fast once the
workers all accessed simultaneously (the dbase process would hang itself
and consequently the webserver). We changed to FirebirdSQL, and that's
when we could stop worrying about the database and focus on the user
end.
There was alot of pain coming our way from the customer
(understandibly), because the system was getting unusable.

Even if your project is a small company, you should always have a bigger
picture and future growth in mind. You would want your client to grow as
a result of a better system. (in the above example, the client was
expanding to other countries, and the extranet system we started did
help. They since hired someone else, but it was my boss giving up on an
annoying customer).
sinister - 16 May 2008 14:04 GMT
Thanks for your reply and interesting comments.

>> I'm supervising the development of a database system with a web
>> interface.
[quoted text clipped - 8 lines]
> that he only knows MySQL and is unwillig to expand his knowledge to
> other RDBMs.

He was actually willing to use PostgreSQL.  What happened is that he wanted
to use a content management system, and the CMS of his choice is only
starting to allow the use of postgres as a backend.

His desire to use a CMS is actually, in retrospect, a bad decision I think,
because we don't need a CMS, just a web front-end for our DB, and CMS's are
mainly (AFAICT) built for the situation where you're doing web hosting and
don't have real control over things.  E.g. instead of using the RDMS's own
access control and privilege system, the CMS has its own.

But that's OT.

:-)

>> After a conversation involving two tables which I thought ought to be
>> connected by a foreign key relationship, I went and checked his DB; I was
[quoted text clipped - 10 lines]
> Did you create an ERD? That might be an easy(er) way to explain it to
> him.

I think he understands the concepts, just not why it's important.

>> What do I do if he gets back to me and says---as I'm sure everyone in his
>> position does---"oh, but my PHP code makes sure everything is done
[quoted text clipped - 3 lines]
> his paycheck writers) time re-inventing a wheel that is already running
> smoothly. <g>

That's a very interesting issue.  We had a guy who was very green, so he was
only learning and I was writing all the code.  So we let him go and a few
months later we hired this new guy.  I have other duties (scientific,
non-IT), so my boss didn't want me spending that much time on this in the
long run.  I warned him that if we hired someone new, he'd want to discard
my work and do his own.

Which is what happened.  At least the guy agreed with the basic architecture
(opensource RDMS backend, apache/PHP-driven frontend).  But in terms of
actual details he did redo everything except for the server itself (OS and
Apache).

I could have told him he had to work within my design, but I'm not a
programmer by trade (do it on the side in the course of my scientific
duties).  I've noticed that my attitude is pretty different from his, and
from what I see on the web (e.g. learning about the CMS):  mine is (a) "keep
it simple, stupid," and (b) validity and efficiency of design are far more
important than appearance (of the interface).  Looking at his work and the
stuff you see on the web, seems like a lot of programmers---well, at least
web programmers---don't agree with that.

The mere fact that so many web hosting companies provide MySQL rather than
postgresql shows me that someone is wrong out there---if web designers using
RDMS's really knew what they're doing, they'd demand access to postgres.

They'd also never leave foreign keys out of their designs, too, I guess.

:-)

>> Not that I don't know what to say, but it would be good to have a pointer
>> to
[quoted text clipped - 5 lines]
> something different then the website?". Then all the "make sure" code is
> rendered utterly useless.

That's a good point I hadn't thought about.  I do access the DB through the
backend all the time, and I shudder at the thought of not having fk
constraints.

> Then there's the problem MySQL has with ttransactions - I don't know the
> details, but seems there are some shortcommings.

I think MySQL is nominally a lot better than it was before because now you
have InnoDB.  I wouldn't trust MySQL, however, because the people who
started the project at the beginning clearly had no understanding about
RDMS's.

>> Sure, I could say, "Your next assignment is to read a book on DB theory,
>> and
[quoted text clipped - 22 lines]
> help. They since hired someone else, but it was my boss giving up on an
> annoying customer).

I agree...that's why I do think the backend should be the primary focus.
When I was doing the main coding, it amazed me that most of the labor (> 85%
I estimate) went into the frontend (PHP coding), yet the backend provided so
much power.  And while naive users can't do much of anything using simple
client access to the backend---I have a hard enough time teaching them
simple Linux commands---I could do anything I wanted to, very easily
Marshall - 16 May 2008 15:52 GMT
> I have other duties (scientific,
> non-IT), so my boss didn't want me spending that much time on this in the
> long run.  I warned him that if we hired someone new, he'd want to discard
> my work and do his own.

When I was a green programmer myself, I pretty much believed that
there
was no problem so small nor codebase so large that it couldn't best be
handled by throwing out the previous guy's work and building it fresh
myself.

As a seasoned programmer, I now consider doing that to be a near-100%
predictor of disaster.

> I've noticed that my attitude is pretty different from his, and
> from what I see on the web (e.g. learning about the CMS):  mine is (a) "keep
> it simple, stupid," and (b) validity and efficiency of design are far more
> important than appearance (of the interface).  Looking at his work and the
> stuff you see on the web, seems like a lot of programmers---well, at least
> web programmers---don't agree with that.

<heavy sigh.>

Yeah.

> The mere fact that so many web hosting companies provide MySQL rather than
> postgresql shows me that someone is wrong out there---if web designers using
> RDMS's really knew what they're doing, they'd demand access to postgres.
>
> They'd also never leave foreign keys out of their designs, too, I guess.

You  know about "Worse is Better?"

> I think MySQL is nominally a lot better than it was before because now you
> have InnoDB.  I wouldn't trust MySQL, however, because the people who
> started the project at the beginning clearly had no understanding about
> RDMS's.

If you stick to pure InnoDB, MySQL can be made to not suck very
much at all. But yeah, it's no postgress no matter how much lipstick
you put on the pig.

> I agree...that's why I do think the backend should be the primary focus.
> When I was doing the main coding, it amazed me that most of the labor (> 85%
> I estimate) went into the frontend (PHP coding), yet the backend provided so
> much power.  And while naive users can't do much of anything using simple
> client access to the backend---I have a hard enough time teaching them
> simple Linux commands---I could do anything I wanted to, very easily

Ouch. This comes up a lot. (About once a year we have a big flamefest
with comp.object, where many of the frontend coders get to have their
say about this.) There's this problem that comes when the programmers
who understand application code well and who don't understand data
management at all are put in charge of overall application
architecture.
Naturally they want to do everything in application code, because it's
what they understand.

Marshall
sinister - 16 May 2008 17:47 GMT
>> I have other duties (scientific,
>> non-IT), so my boss didn't want me spending that much time on this in the
[quoted text clipped - 10 lines]
> As a seasoned programmer, I now consider doing that to be a near-100%
> predictor of disaster.

I didn't think it was a good idea to chuck out the old code.  I just thought
our programming styles were way too different.

Easiest thing would have been for my boss to let me continue doing all the
coding, but he wanted me to stick to the science part in the long run.
Plus, at the time I was considering leaving town, so I didn't want to get
halfway through development and then leave them in a lurch.

>> I've noticed that my attitude is pretty different from his, and
>> from what I see on the web (e.g. learning about the CMS):  mine is (a)
[quoted text clipped - 20 lines]
>
> You  know about "Worse is Better?"

Yeah, I read about browsing the web a few months ago, though the stuff I
read, mainly the Wikipedia page, didn't give me enough examples I was
familiar with to get a good feel for it.

>> I think MySQL is nominally a lot better than it was before because now
>> you
[quoted text clipped - 23 lines]
> Naturally they want to do everything in application code, because it's
> what they understand.

Yep.

I'm lucky enough to have taken a relatively decent DB theory class.

> Marshall
paul c - 16 May 2008 22:31 GMT
> ...
> I think he understands the concepts, just not why it's important.
> ...

Contradiction!
Evan Keel - 17 May 2008 22:22 GMT
> I'm supervising the development of a database system with a web interface.
>
[quoted text clipped - 24 lines]
>
> :-(

I think you are confusing foreign keys with declarative referential
integrity. Foreign keys are a must and I'm sure your database uses them.
What you are talking about (and I agree) is a constraint.
jonniesavell - 18 May 2008 01:18 GMT
> I think you are confusing foreign keys with declarative referential
> integrity. Foreign keys are a must and I'm sure your database uses them.
> What you are talking about (and I agree) is a constraint.

OK. I am stupid. I thought that an instance of declarative referential
integrity in DDL create a foreign key between one or two tables in the
database.

What's the difference?

-jonnie
David Cressey - 18 May 2008 11:15 GMT
> > I think you are confusing foreign keys with declarative referential
> > integrity. Foreign keys are a must and I'm sure your database uses them.
[quoted text clipped - 3 lines]
> integrity in DDL create a foreign key between one or two tables in the
> database.

Not stupid.  Just ignorant.  The wonderful thing about ignorance is that it
can be cured.  Read up on the subject, as others have suggested.

The above argument is about definitions.

> What's the difference?

If I say "select * from orders inner join order_detail
    on orders.order_no = order_detail.order_no;

then order_details.order_no  must be a "foreign key"  regardless of whether
it was declared as such in DDL.

If in the above case,  order_details.order_no is for some strange reason NOT
a foreign_key reference to the corresponding row in orders,  then you are
the victim of a sadistic and perverse database designer.  Or perhaps just a
supremely ignorant one.
Brian Selzer - 19 May 2008 13:34 GMT
>> > I think you are confusing foreign keys with declarative referential
>> > integrity. Foreign keys are a must and I'm sure your database uses
[quoted text clipped - 26 lines]
> a
> supremely ignorant one.

I think you're mistaken, David.  A foreign key constraint is a database
constraint that guarantees that whenever there is a row in a referencing
table, there is one and only one row in the table it references.  Sometimes
that is too restrictive.  Suppose, for example, that in addition to
"orders," you also have "quotes."  Assume for the sake of this argument that
the heading of the details for a quote is identical to the heading for the
details for an order--it's just a list of parts and/or services, right?  Is
it sadistic and perverse or supremely ignorant to combine into a single
table the details for both quotes and orders?  Suppose that you have
additional columns on a quote, for example, "date_quoted,"
"quote_valid_through," that don't appear on an order, and additional columns
on an order, for example, "date_ordered," that don't appear on a quote.
Without introducing nulls, you can't stuff both quotes and orders into the
same table, but you CAN stuff the detail in the same table, and in fact it
may make business sense to do so since it simplifies the process of
transforming a quote into an order.
David Cressey - 19 May 2008 13:39 GMT
> > "jonniesavell" <jsavell@gmail.com> wrote in message

news:9e62cc4a-4e40-4cf5-9503-2bd77e0ddf46@x19g2000prg.googlegroups.com...

> >> > I think you are confusing foreign keys with declarative referential
> >> > integrity. Foreign keys are a must and I'm sure your database uses
[quoted text clipped - 28 lines]
>
> I think you're mistaken, David.

Go back and read my comment again.

>A foreign key constraint is a database
> constraint that guarantees that whenever there is a row in a referencing
> table, there is one and only one row in the table it references.

I know that,  and you should know by now that I know that.

A foreign key and a foreign key constraint are not the same thing.

[snippage]
Brian Selzer - 19 May 2008 18:55 GMT
>> > "jonniesavell" <jsavell@gmail.com> wrote in message
>> >
[quoted text clipped - 44 lines]
>
> I know that,  and you should know by now that I know that.

I know that you know, and I know that you know that I know that you know,
but I don't know that everyone else knows what we both know--especially
since the above argument is about definitions :-)

> A foreign key and a foreign key constraint are not the same thing.

That's a new one on  me.  What's the difference?
David Cressey - 19 May 2008 20:36 GMT
> >> > "jonniesavell" <jsavell@gmail.com> wrote in message

news:9e62cc4a-4e40-4cf5-9503-2bd77e0ddf46@x19g2000prg.googlegroups.com...

> >> >> > I think you are confusing foreign keys with declarative referential
> >> >> > integrity. Foreign keys are a must and I'm sure your database uses
[quoted text clipped - 48 lines]
>
> That's a new one on  me.  What's the difference?

order_details.order_id is a foreign key that references a given order and
provides a natural join to orders.order_id  (presumably the primary key of
orders).  It's a foreign key even if you never state that fact in the DDL.
If it references any non existent primary key,  the data has violated
referential integrity.  You can prevent violations of referential integrity
either by declaring a foreign key constraint or by careful programming.

I don't trust careful programming much if I'm the programmer.  And if
somebody else is the programmer, I trust it even less than that.

Clear?
Brian Selzer - 20 May 2008 02:25 GMT
>> >> > "jonniesavell" <jsavell@gmail.com> wrote in message
>> >
[quoted text clipped - 71 lines]
>
> Clear?

As mud.  If you don't state that fact in the DDL, then you are implicitly
permitting an order_details.order_id without a corresponding
orders.order_id.

I'm still not clear on the difference between a foreign key and a foreign
key constraint.  Is a foreign key a value?  What is it if it isn't a
constraint?
Bob Badour - 19 May 2008 20:06 GMT
>>>"jonniesavell" <jsavell@gmail.com> wrote in message
>
[quoted text clipped - 39 lines]
>
> [snippage]

Is there simlarly a difference between a primary key and a primary key
constraint? Or a candidate key and a candidate key constraint?
David Cressey - 19 May 2008 20:30 GMT
> >>>"jonniesavell" <jsavell@gmail.com> wrote in message

news:9e62cc4a-4e40-4cf5-9503-2bd77e0ddf46@x19g2000prg.googlegroups.com...

> >>>>>I think you are confusing foreign keys with declarative referential
> >>>>>integrity. Foreign keys are a must and I'm sure your database uses  them.
[quoted text clipped - 38 lines]
> Is there simlarly a difference between a primary key and a primary key
> constraint? Or a candidate key and a candidate key constraint?

Well, as you've said more than once,  the concept of primary key doesn't
exist at the RDM level of abstraction.  so it might be a little unclear
exactly what is meant by a "primary key" in the absence of a declared
primary key constraint.  I can make an educated guess, and it goes something
like this:

We have a convention that,  of all the candidate keys that might be used to
reference a table,  one of them is chosen for all of the references.  By
this convention, we wouldn't have some foreign keys that reference the
employees table by employee_id,  while others reference it by SSN.  That
convention, which exists only in documentation, and not in the DDL,  might
be called "declaring a primary key"  in some environments.

I *don't* want to rekindle the old argument about whether it's smart or
stupid to have primary keys without declaring them in the DDL,  or having
foreign keys without declaring them in the DDL.  You and I are on the same
side of the question about whether DBMS enforced referential integrity is
worth the cost.  I'm guessing we're probably on the same side about
declaring primary keys  (which, when I was learning RDM, was referred to as
"entity integrity enforcement").  If there other people on the other side of
that argument lurking out there,  I'm just going to pass on trying to use
either sweet reason or sarcasm to wake them up.

I'm not sure what a candidate key constraint would be.  In my world,  I
guess you could use a UNIQUE constraint and one or more NOT NULL constraints
to acheive the desired effect.  It's not clear to me whether you want to do
that in every case.
paul c - 19 May 2008 23:19 GMT
...
> Well, as you've said more than once,  the concept of primary key doesn't
> exist at the RDM level of abstraction.  ...

Maybe not "primary key" but the idea of a key is certainly inherent in
the RDM assuming you will admit 'rename' plus the original operators
natural join, select and project, to it.

(Heh, the first time I saw that "aref" tag in HTML, I thought "good for
them, they've lifted a useful idea of Codd's from twenty years ago and
generalized it to a mere reference"!  Then I realized there was no "aref
constraint", so the author doesn't have an inherent way to make the html
stick.  The bind is so late that only the user knows - weird!)
David Cressey - 20 May 2008 11:21 GMT
> ...
> > Well, as you've said more than once,  the concept of primary key doesn't
[quoted text clipped - 3 lines]
> the RDM assuming you will admit 'rename' plus the original operators
> natural join, select and project, to it.

Absolutely.  In the previous comments in this thread, the term "candidate
key" was used.
You can shorten that to simply,  "key", if you like.  No problem.  The word
"candidate"  was introduced into the terminology with the idea that the
primary key would be selected among the candidate keys.  What I think I've
learned in c.d.t. in years gone by is that the selection of one candidate
key to be the primary key is not inherent in Relational modeling.  IIRC, I
learned it from Bob's writings.

> (Heh, the first time I saw that "aref" tag in HTML, I thought "good for
> them, they've lifted a useful idea of Codd's from twenty years ago and
> generalized it to a mere reference"!  Then I realized there was no "aref
> constraint", so the author doesn't have an inherent way to make the html
> stick.  The bind is so late that only the user knows - weird!)

I don't know "aref".  That's a new one on me.

But don't get me started on HTML.  I think that it was a wonderful thing for
a physicist to come up with a way of propagating information over the
internet without being blocked by format incompatibilities.  But I also
think that HTML was the ultimate perpetration of an uncontrolled graph of
"hrefs" and pages.  It has all the problems of a graph DBMS,  and then some.
paul c - 20 May 2008 16:31 GMT
...
> Absolutely.  In the previous comments in this thread, the term "candidate
> key" was used.
[quoted text clipped - 5 lines]
> learned it from Bob's writings.
> ...

Yes, isn't the choice what Date calls psychological, ie., part of the
desired interpretation.

...
> I don't know "aref".  That's a new one on me.
> ...

Oh, I should have said "a href".

> But don't get me started on HTML.  I think that it was a wonderful thing for
> a physicist to come up with a way of propagating information over the
> internet without being blocked by format incompatibilities.  But I also
> think that HTML was the ultimate perpetration of an uncontrolled graph of
> "hrefs" and pages.  It has all the problems of a graph DBMS,  and then some.

Okay, don't get me started on mysticism either!
Brian Selzer - 21 May 2008 12:48 GMT
> ...
>> Absolutely.  In the previous comments in this thread, the term "candidate
[quoted text clipped - 12 lines]
> Yes, isn't the choice what Date calls psychological, ie., part of the
> desired interpretation.

I don't think the choice has anything to do with the desired or intended
interpretation.  The information contained within a database is the same
regardless of which candidate key is designated to be the primrary key.  As
far as the logic is concerned, the choice is completely arbitrary.  That's
not to say that there may not be a sound reason to choose one over another:
just that that reason is a matter of implementation, not interpretation.

> ...
>> I don't know "aref".  That's a new one on me.
[quoted text clipped - 11 lines]
>
> Okay, don't get me started on mysticism either!
paul c - 21 May 2008 17:38 GMT
...
> I don't think the choice has anything to do with the desired or intended
> interpretation.  The information contained within a database is the same
[quoted text clipped - 3 lines]
> just that that reason is a matter of implementation, not interpretation.
> ...

Saying that a choice is arbitrary yet not psychological is the most
magical kind of mysticism.
Brian Selzer - 21 May 2008 18:41 GMT
> ...
>> I don't think the choice has anything to do with the desired or intended
[quoted text clipped - 8 lines]
> Saying that a choice is arbitrary yet not psychological is the most
> magical kind of mysticism.

I didn't say that it is not necessarily psychological.  I said that it had
nothing to do with the desired or intended interpretation.  What does
psychology have to do with the fact that sometimes you pull the middle beer
from the left hand side of a fresh six-pack and sometimes the nearest from
the right hand side?  Are we supposed to read something into the fact that
once in a while you pull the beer furthest away from you on the right-hand
side?  The beer closest to you should taste just as good as the one furthest
away.  The choice of which candidate key is to be primary has as much to do
with the intended interpretation as the choice of which beer you pull first
out of a fresh six-pack has on how good it tastes.
paul c - 22 May 2008 04:18 GMT
...
> I didn't say that it is not necessarily psychological.  I said that it had
> nothing to do with the desired or intended interpretation.  What does
[quoted text clipped - 7 lines]
> out of a fresh six-pack has on how good it tastes.
> ...

Much as I'm tempted, I'll refrain from calling the first sentence
mystical.  Does seem pathologically ambiguous, though.  Way beyond my ken.
Bob Badour - 22 May 2008 04:25 GMT
> ...
>
[quoted text clipped - 13 lines]
> Much as I'm tempted, I'll refrain from calling the first sentence
> mystical.  Does seem pathologically ambiguous, though.  Way beyond my ken.

Double negatives are like that. In essense, he is saying he didn't say
anything.
Brian Selzer - 22 May 2008 08:35 GMT
>> ...
>>
[quoted text clipped - 17 lines]
> Double negatives are like that. In essense, he is saying he didn't say
> anything.

Not so.  Are you brain damaged?  (That would explain a lot....)  I said one
thing, and then paul c implied that I said something else.  Denying what
paul c implied that I said does not deny what I originally said.  So you're
wrong in saying that I'm saying that I didn't say anything.  But then again,
you're often wrong--even if you won't admit it.  I wonder...do you really
enjoy making a fool of yourself?  Just in case you don't, here's a little
bit of wisdom I heard somewhere: it is better to remain silent and let
people think you're an idiot than to open your mouth and remove all doubt.
paul c - 22 May 2008 14:46 GMT
...
> Not so.  Are you brain damaged?  (That would explain a lot....)  I said one
> thing, and then paul c implied that I said something else.  Denying what
[quoted text clipped - 5 lines]
> people think you're an idiot than to open your mouth and remove all doubt.
> ...

As in other fields, mysticism goes negative when cornered.  With those
initials it would be especially smart to avoid the personal stuff.
Bob Badour - 22 May 2008 17:08 GMT
> ...
>
[quoted text clipped - 4 lines]
>> didn't say anything.  But then again, you're often wrong--even if you
>> won't admit it.

I make a point of going out of my wait to admit when I am wrong. I am
just not wrong anywhere near as often as the self-aggranding ignorant
thinks I am.

  I wonder...do you really enjoy making a fool of
>> yourself?

Sometimes. I enjoy clowning around as much as the next guy. And I
certainly don't let fear of embarrassment deter me in any way.

Somehow, though, I suspect I don't make a fool of myself anywhere near
as often as the self-aggrandizing ignorant thinks I do. And given his
apparent ability to assess things, I probably make a fool of myself when
he thinks I don't.

  Just in case you don't, here's a little bit of wisdom I
>> heard somewhere: it is better to remain silent and let people think
>> you're an idiot than to open your mouth and remove all doubt.
>> ...

Was Selzer trying to prove that hearing and listening have different
meanings? I wasn't aware that needed any proof.

> As in other fields, mysticism goes negative when cornered.  With those
> initials it would be especially smart to avoid the personal stuff.

When you talk about mystics, are you talking about those who live by the
creed: "If one cannot dazzle them with brilliance, baffle them with
bullshit." ? I am not entirely sure I understand what you mean when you
use the word mysticism.
paul c - 22 May 2008 17:54 GMT
...
> bullshit." ? I am not entirely sure I understand what you mean when you
> use the word mysticism.

The mystics here are the people who confuse a system with the reality
that the system only mimics imperfectly, the system being at most a mere
metaphor, for example pretending that an algebraic structure somehow
embodies actual 'entities' or thinking that there is actually a
relational operator called 'update', when Codd was obviously using the
word 'update' only as a way to sound familiar to his audience.

They are a subset of the masses who cannot make change without a
computer.  I remember when slide-rules were not allowed at some exams,
today I meet people in the mechanical field who cannot even operate a
calculator!  That's part of the new reality in the modern semi-literate
western societies, not to mention those who confuse oligarchy for democracy!
paul c - 22 May 2008 18:04 GMT
> ...
>> bullshit." ? I am not entirely sure I understand what you mean when
[quoted text clipped - 13 lines]
> western societies, not to mention those who confuse oligarchy for
> democracy!

Ie., meaning in machinery is merely psychological, subject to all the
natural human mis-interpretations, can't express intent, mechanics and
poetry will never meet even though some fools think a formal marriage is
possible.  I told David C not to get me started on mystics!
David Cressey - 23 May 2008 12:25 GMT
> Ie., meaning in machinery is merely psychological, subject to all the
> natural human mis-interpretations, can't express intent, mechanics and
> poetry will never meet even though some fools think a formal marriage is
> possible.  I told David C not to get me started on mystics!

This may be true.  But with regard to the value of data in databases,  and
the return on the effort involved in building, maintaining, and accessing
them,  you can't separate meaning from purpose.  And you can't separate
purpose from outcome.  Call me a mystic, if you must.

If poetry includes Homer's Iliad,  there is quite a bit of mechanics
involved in the making of it.
paul c - 23 May 2008 14:42 GMT
...
> This may be true.  But with regard to the value of data in databases,  and
> the return on the effort involved in building, maintaining, and accessing
[quoted text clipped - 3 lines]
> If poetry includes Homer's Iliad,  there is quite a bit of mechanics
> involved in the making of it.

I don't argue with that and from what you've said I wouldn't call you a
mystic.  I was scoffing at the penchant for looking for meaning in a
data design where none was intended.  If one doesn't know the intended
interpretation, it is a mug's game to guess at it, the design is only
capable of restricting some of the possible intentions.

(I'd say the mechanics of poetry aren't part of what you call the rdm.)
David Cressey - 23 May 2008 16:56 GMT
> ...
> > This may be true.  But with regard to the value of data in databases,  and
[quoted text clipped - 12 lines]
>
> (I'd say the mechanics of poetry aren't part of what you call the rdm.)

Agreed.  I just don't want poetry to be relegated to the domain of mystics,
and databases to be relegated to the domain of mechanics.  Mechanics are
important to doing things right, no matter what you're doing.  Doing things
right is kind of a waste, if you're not doing the right thing.  And figuring
out what the right thing is  can seem downright mystical.  At least,  so it
seems to me.
Bob Badour - 23 May 2008 17:40 GMT
>>...
>>
[quoted text clipped - 21 lines]
> out what the right thing is  can seem downright mystical.  At least,  so it
> seems to me.

I think it only seems that way before one knows what metrics to use.
Once one understands what to measure, everything becomes much more
mechanical.
David Cressey - 23 May 2008 19:30 GMT
> >>...
> >>
[quoted text clipped - 25 lines]
> Once one understands what to measure, everything becomes much more
> mechanical.

Well,  how do you tell a good metric from a bad one?
Bob Badour - 23 May 2008 20:33 GMT
>>>>...
>>>>
[quoted text clipped - 26 lines]
>
> Well,  how do you tell a good metric from a bad one?

A good metric, like ROA, reflects the goal.
David Cressey - 23 May 2008 21:19 GMT
> >>>>...
> >>>>
[quoted text clipped - 28 lines]
>
> A good metric, like ROA, reflects the goal.

And how do you tell a good goal from a bad goal?
Bob Badour - 23 May 2008 21:30 GMT
>>>>>>...
>>>>>>
[quoted text clipped - 30 lines]
>
> And how do you tell a good goal from a bad goal?

In the private sector, that's easy. A good goal is one that maximizes
shareholder value.

I won't work in the public sector.
Marshall - 23 May 2008 22:50 GMT
> >>>Well,  how do you tell a good metric from a bad one?
>
[quoted text clipped - 6 lines]
>
> I won't work in the public sector.

I'm not sure if this is what David is talking about, but I've
noticed that metrics tend to do a better job of telling you
how you're doing than telling you where you ought to go.
For instance, it's easier to come up with a metric to
measure the success of the iPod than it is to come up
with a metric that will tell you that your computer company
ought to make a portable music player.

This is not to discount the value of measurement: it's critical.
But it's not always sufficient.

Marshall
goanna - 24 May 2008 07:32 GMT
>>>>>I think it only seems that way before one knows what metrics to use.
>>>>>Once one understands what to measure, everything becomes much more
[quoted text clipped - 5 lines]
>>
>> And how do you tell a good goal from a bad goal?

>In the private sector, that's easy. A good goal is one that maximizes
>shareholder value.

And here we have in a nutshell the now almost universally accepted core
of free market capitalism, US style: the one dimensional optimisation
of profit for the investor (which of course is just code for optimising
the profits of the parasite classes who steal from the real investors).

No multidimensional tradeoff needed, no consideration of the personal,
family, community, social, national, or environmental impact of ones
business practices required.  Need third world wage slaves? No problem.
Leaving behind a toxic legacy for future generations? Fine, just make
sure to effectively insulate the corporation from direct responsibility
for the problem.   Selling a product that harms people or panders to
their lowest instincts? Just ensure plausible deniability of knowledge
of the ill effects, and enlist the spin doctors to create a shiny
corporate image that can hide the moral squalor within.  Breaking the
law? Just make sure the cost of being caught is less than the profit.
Need to corrupt and sexualise little children to grow market share?
Go right ahead, the government won't stand in your way, or if they try
just buy enough of them off to forestall any intervention.

The worship of profit at any cost now so completely dominates modern
US thinking that it is seen as a given, a natural state of affairs,
to be accepted quite uncritically, perhaps even unconsciously.  Even
US churches now encourage personal aspiration to be selfishly rich,
to have more, to consume endlessly without regard to the real cost.
Europe and the rest of the western world is not far behind, as toxic
US "greed is good/god" culture sweeps all before it.

Capitalism may have soundly defeated communism, but that doesn't make
it the best possible system that could exist.  It is quite literally
destroying the planet on which we live.  As the billions in China
and India climb aboard the bandwagon, we accelerate towards a crisis
of suffering and conflict from which some more enlightened system may
eventually emerge.  But how can we expect enlightened thinking from
a world population that is either mindlessly supportive of the modern
interpreters of ancient superstitions, or has been taught from near
birth that it's good to behave as selfishly and greedily as possible?

We cannot return to the ancient gods, nor continue to prosper under
the new gods of unlimited corporate greed and rampant consumerism.
Democracy is an experiment that, like communism, has clearly proved
incapable of keeping the scum of society from taking control and
steering us down a road to nowhere.  How many voters set aside their
personal interests and vote in the interests of the greater good?
The fierce pace and awesome complexity of the modern world renders us
too stupid, prejudiced, narrow, distracted, spineless or unthinking
to be able to identify where our collective interest really lies.

What we need is a new noble warrior class dedicated to selflessness,
sworn to live a simple, meaningful and effective life serving not
bosses or nations but the entire world, acting locally and directly
to destroy those who would prey upon us and it.  Self-regulation of
the human swarm, emerging not from mass individual selfishness, but
from the courage, watchfulness, humanism and sacrifice of a few.
Bruce C. Baker - 24 May 2008 07:52 GMT
[...]

Don't hold back, goanna! Tell us how you /really/ feel!
Brian Selzer - 24 May 2008 14:48 GMT
>>>>>>I think it only seems that way before one knows what metrics to use.
>>>>>>Once one understands what to measure, everything becomes much more
[quoted text clipped - 27 lines]
> Go right ahead, the government won't stand in your way, or if they try
> just buy enough of them off to forestall any intervention.

Well, thanks to liberals, the First Amendment, which was originally intended
to protect political speech, has been perverted--I'm sorry, interpreted--so
that it prevents the government from standing in the way.  You made your own
bed, now sleep in it.

> The worship of profit at any cost now so completely dominates modern
> US thinking that it is seen as a given, a natural state of affairs,
[quoted text clipped - 3 lines]
> Europe and the rest of the western world is not far behind, as toxic
> US "greed is good/god" culture sweeps all before it.

That's because it /is/ a natural state of affairs.  Why else would there
have been written millenia ago, "Thou shalt not covet...."

Of course, thanks to the ACLU, that word is reaching fewer and fewer people.

> Capitalism may have soundly defeated communism, but that doesn't make
> it the best possible system that could exist.  It is quite literally
[quoted text clipped - 5 lines]
> interpreters of ancient superstitions, or has been taught from near
> birth that it's good to behave as selfishly and greedily as possible?

The problem is that they haven't been taught not to covet.  Again, you've
made your own bed, now sleep in it.

> We cannot return to the ancient gods, nor continue to prosper under
> the new gods of unlimited corporate greed and rampant consumerism.
[quoted text clipped - 5 lines]
> too stupid, prejudiced, narrow, distracted, spineless or unthinking
> to be able to identify where our collective interest really lies.

Here's the flaw in your thinking: there is no greater good--except God.
Marginalize God (if that is even possible), and the world starts to
degenerate into chaos.

> What we need is a new noble warrior class dedicated to selflessness,
> sworn to live a simple, meaningful and effective life serving not
> bosses or nations but the entire world, acting locally and directly
> to destroy those who would prey upon us and it.  Self-regulation of
> the human swarm, emerging not from mass individual selfishness, but
> from the courage, watchfulness, humanism and sacrifice of a few.

And I suppose that you would elect yourself to be in that class?
David Cressey - 24 May 2008 15:32 GMT
> >>>>>>I think it only seems that way before one knows what metrics to use.
> >>>>>>Once one understands what to measure, everything becomes much more
[quoted text clipped - 72 lines]
> Marginalize God (if that is even possible), and the world starts to
> degenerate into chaos.

Agreed.  And it's an important point.  However, it can be called mysticism.

Goanna's response is mysticism of a different sort.

> > What we need is a new noble warrior class dedicated to selflessness,
> > sworn to live a simple, meaningful and effective life serving not
[quoted text clipped - 4 lines]
>
> And I suppose that you would elect yourself to be in that class?

Yuk, Yuk.
Bob Badour - 24 May 2008 15:22 GMT
>>>>>>I think it only seems that way before one knows what metrics to use.
>>>>>>Once one understands what to measure, everything becomes much more
[quoted text clipped - 13 lines]
> of profit for the investor (which of course is just code for optimising
> the profits of the parasite classes who steal from the real investors).

So, the pensioners whose pensions hold most of the shares are parasites?
Are you suggesting it's a myth that a lifetime of toil means they earned
their wealth?

> No multidimensional tradeoff needed, no consideration of the personal,
> family, community, social, national, or environmental impact of ones
> business practices required.  Need third world wage slaves? No problem.

With all due respect, I have never forced the third world to breed
themselves into a malthusian trap. If they want to flood the market with
third world laborers, they will have to accept the consequences of their
behaviour.

[remaining socialist stupidity snipped]
Ed Prochak - 27 May 2008 19:59 GMT
> > In <4837296d$0$4034$9a566...@news.aliant.net> Bob Badour <bbad...@pei.sympatico.ca> writes:
>
[quoted text clipped - 17 lines]
>
> So, the pensioners whose pensions hold most of the shares are parasites?

Are you suggesting pensioners hold the majority of stocks in the USA?
I think you are badly mistaken.

I did a quick google search and find the top two articles both said
basically the same thing. Namely that wealth is concentrated in a
small percentage of the population. Here's part of one web page:
start quote:::
MM: What portion of the wealth is owned by the upper groups?
Wolff: The top 5 percent own more than half of all wealth.

In 1998, they owned 59 percent of all wealth. Or to put it another
way, the top 5 percent had more wealth than the remaining 95 percent
of the population, collectively.

The top 20 percent owns over 80 percent of all wealth. In 1998, it
owned 83 percent of all wealth.

This is a very concentrated distribution.
   ::: end quote
from http://multinationalmonitor.org/mm2003/03may/may03interviewswolff.html

> Are you suggesting it's a myth that a lifetime of toil means they earned
> their wealth?

But the issue really is: where do the benefits of wealth go?

and since this is way off topic in c.d.t, that's all I will say.

 Ed
Bob Badour - 27 May 2008 21:19 GMT
>>>In <4837296d$0$4034$9a566...@news.aliant.net> Bob Badour <bbad...@pei.sympatico.ca> writes:
>>
[quoted text clipped - 27 lines]
> MM: What portion of the wealth is owned by the upper groups?
> Wolff: The top 5 percent own more than half of all wealth.

What makes you think pensioners cannot be in the top 5 percent?

Granted, Microsoft and Google have concentrated a lot of wealth in a few
hands.

> In 1998, they owned 59 percent of all wealth. Or to put it another
> way, the top 5 percent had more wealth than the remaining 95 percent
[quoted text clipped - 15 lines]
>
>   Ed
Bob Badour - 23 May 2008 15:15 GMT
>>Ie., meaning in machinery is merely psychological, subject to all the
>>natural human mis-interpretations, can't express intent, mechanics and
[quoted text clipped - 8 lines]
> If poetry includes Homer's Iliad,  there is quite a bit of mechanics
> involved in the making of it.

Ya gotta like a good spondee every now and again just for some oomph.
Marshall - 23 May 2008 18:32 GMT
> Ya gotta like a good spondee every now and again just for some oomph.

Spondee is great for that.

Dactylic verse is severely underrated.

http://en.wikipedia.org/wiki/Double_dactyl

I find words that are double dactyls by themselves are
aesthetically pleasing. Incontrovertibly.

   "Hey-nonny, ho-nonny,
   Penis Van Lesbian
   Entered the bus'ness that
   no biz is like."

   "Keen on increasing his
   marketability,
   he took on the stage name
   of Dick Van Dyke."

Marshall

PS. My stupid spell checker recognizes neither "spondee" nor "oomph."
Brian Selzer - 23 May 2008 03:58 GMT
> ...
>> bullshit." ? I am not entirely sure I understand what you mean when you
[quoted text clipped - 6 lines]
> operator called 'update', when Codd was obviously using the word 'update'
> only as a way to sound familiar to his audience.

Who here pretends that an algebraic structure embodies actual 'entities?'
Can you cite examples?  And by the way, I suggest you read Codd's book.
Pages 89-90 describe the Update operator and the justification for it.
Also, you might want to look at the article "Extending the Database
Relational Model to Capture More Meaning" in TODS 4-4.  On page 400, where
he is describing the original Relational Model, he writes,

   All insertions into, updates of, and deletions from base relations are
constrained
   by the following two rules....

I could cite other instances, but I think these sufficiently show that
you're interpretation of Codd's use of the word 'update' is faulty.

> They are a subset of the masses who cannot make change without a computer.
> I remember when slide-rules were not allowed at some exams, today I meet
> people in the mechanical field who cannot even operate a calculator!
> That's part of the new reality in the modern semi-literate western
> societies, not to mention those who confuse oligarchy for democracy!

Didn't you know that keeping the unwashed masses ignorant is one of the
primary objectives of liberal elitists?  Why then are you lamenting the fact
that the campaign is succeeding?
paul c - 23 May 2008 05:05 GMT
...
> Who here pretends that an algebraic structure embodies actual 'entities?'
> Can you cite examples?  And by the way, I suggest you read Codd's book.
[quoted text clipped - 10 lines]
> you're interpretation of Codd's use of the word 'update' is faulty.
> ...

Not to mention any names, BS, but Codd's venture into semantics has
troubled a lot of the deeper thinkers  and prompted many sycophants to
waste a lot of time for the rest of us.   I had a feeling that
mentioning update might get a mystic or two going, apologies to the
others for mentioning it.   Regarding this, I prefer to think that he
was just having some fun, hoping to provoke insights in others that he
wasn't yet sure of (also because I thought he was a nice guy and I
respected the clarity and resolve he had both before and after his most
famous invention). Suit yourself if you'd rather spend all your time
preferring to think what you want.  It's hard for me to converse with
mystics, especially the ones who can't stay on on a single track,
mystical or otherwise!
Brian Selzer - 23 May 2008 10:17 GMT
> ...
>> Who here pretends that an algebraic structure embodies actual 'entities?'
[quoted text clipped - 23 lines]
> want.  It's hard for me to converse with mystics, especially the ones who
> can't stay on on a single track, mystical or otherwise!

Well, then, let's by all means return to that which prompted me to respond
to your post in the first place.

You wrote:

Yes, isn't the choice [of which candidate key is designated as the primary
key] what Date calls psychological, ie., part of the desired interpretation.
<<

This struck me as odd, since what Date calls psychological refers to what
the data means and not how the data is laid out, and the choice of which key
is designated to be primary has no bearing whatsoever on what the data
means.

I responded:

I don't think the choice has anything to do with the desired or intended
interpretation.  The information contained within a database is the same
regardless of which candidate key is designated to be the primrary key.  As
far as the logic is concerned, the choice is completely arbitrary.  That's
not to say that there may not be a sound reason to choose one over another:
just that that reason is a matter of implementation, not interpretation.
<<

You then responded:

Saying that a choice is arbitrary yet not psychological is the most
magical kind of mysticism.
<<

I must say that you are really adept at misinterpretation.  You misinterpret
Codd's use of the word 'update;' you misinterpret Date's use of the word
'psychological;' and now you've misinterpreted my response altogether.
Furthermore, you attributed to me something that I did not say.  If I were
more of a cynic, I would be led to think you have some underlying agenda,
since misdirection is along with projection and obfuscation the bread and
butter of most politicians.  Instead I am allowing myself to believe that
your response can be attributed to your misunderstanding of what consitutes
the intended interpretation.  Just because the choice may be psychological
doesn't mean that it has any effect on the intended interpretation--that is,
what the data means.
paul c - 25 May 2008 00:45 GMT
...  And by the way, I suggest you read Codd's book.
> Pages 89-90 describe the Update operator and the justification for it.
> ...
>
> I could cite other instances, but I think these sufficiently show that
> you're interpretation of Codd's use of the word 'update' is faulty.
> ...

That is a rather legalistic opinion of an informal, conversational
sentence.  Clearly, he is talking about an operator, not just a word.
That aside, this is a topic that has often perplexed me.

To quote the start of that section: "In managing a database, it may be
necessary occasionally to change the values of one or more components of
one or more rows that already exist within a relation.  This is usually
distinguished from inserting entirely new rows because the components to
be changed in value represent a very small percentage of the number of
components in each row."

This strikes me as typical Codd pragmatism, also it is informal, really
just about motivation, and he is hinting very strongly that 'update'
should be fundamental (he doesn't mention delete before 'insert', as if
'insert' could mean wholesale replacement of the original relation).  I
don't object to pragmatism at all, but this paragraph jars with the one
preceding it which is about insert and which specifically mentions set
union as a way to think of insert.

Granted in advance that I am talking only of snippets from a longish
book that has interleaved caveats and references among different
chapters but I especially  note the contrast of this chapter with the
one on view updateability where he rejects certain updates as logically
ambiguous, such as insert to disjoint views that don't have enough
attributes to make the insert un-ambiguous logically.  But how logical
is it to suggest an update operator without saying that it is
fundamental or providing an alternative definition, such as Date and
Darwen do, that depends on additional notions, such as their "EXTEND"?

Maybe I'm misreading and Codd is really trying to avoid all
ambiguities,eg., to protect data designers from themselves when they
overlook the Information Principle but it seems to me that eg., it is
just as logical (and pragmatic) to allow such an insert, distributed
over the relations mentioned in a union view.  Is the result of such an
insert logically true?  I think George Boole would have said yes, even
if he might also say today that the intention of the user-designer
combination is ambiguous as far as the dbms is concerned.  (Regarding
the recent mention of 'metrics', I've always liked binary ones, such as
"does the user find the dbms's behavviour consistent?" or "is it
intuitive?".  I also noticed that Codd advocates that users should be
aware of view definitions, contrary, I think, to D&D!)

(When if comes to implementations, I think that Codd is in basic harmony
with D&D with his emphasis on "assignment".  Also, it's been many years
since I read that book all the way through and I was certainly even less
competent then to read between the lines, so if anybody else wants to
discount my reading, I'd be glad to hear that.  Also, for those who are
interested, acm.org lets you download this book for free, all you have
to do is enable their 'free web' account.)
paul c - 25 May 2008 00:51 GMT
...  And by the way, I suggest you read Codd's book.
> Pages 89-90 describe the Update operator and the justification for it.
> ...
>
> I could cite other instances, but I think these sufficiently show that
> you're interpretation of Codd's use of the word 'update' is faulty.
> ...

That is a rather legalistic opinion of an informal, conversational
sentence.  Clearly, he is talking about an operator, not just a word.
That aside, his intentions on this topic have often perplexed me.

To quote the start of that section: "In managing a database, it may be
necessary occasionally to change the values of one or more components of
one or more rows that already exist within a relation.  This is usually
distinguished from inserting entirely new rows because the components to
be changed in value represent a very small percentage of the number of
components in each row."

This strikes me as typical Codd pragmatism, also it is informal, really
just about motivation, and he is hinting very strongly that 'update'
should be fundamental (he doesn't mention delete before 'insert', as if
'insert' could mean wholesale replacement of the original relation).  I
don't object to pragmatism at all, but this paragraph jars with the one
preceding it which is about insert and which specifically mentions set
union as a way to think of insert.

Granted in advance that I am talking only of snippets from a longish
book that has interleaved caveats and references among different
chapters but I especially  note the contrast of this chapter with the
one on view updateability where he rejects certain updates as logically
ambiguous, such as insert to disjoint views that don't have enough
attributes to make the insert un-ambiguous logically.  But how logical
is it to suggest an update operator without saying that it is
fundamental or providing an alternative definition, such as Date and
Darwen do, that depends on additional notions, such as their "EXTEND"?

Maybe I'm misreading and Codd is really trying to make the avoidance of
 all possible ambiguities a paramount goal,eg., to protect data
designers from themselves when they overlook the Information Principle
but it seems to me that eg., it is just as logical (and pragmatic) to
allow such an insert, distributed over the relations mentioned in a
union view.  Is the result of such an insert logically true?  I think
George Boole would have said yes, even if he might also say today that
the intention of the user-designer combination is ambiguous as far as
the dbms is concerned.  It seems to me that logic often results in
ambiguity for the human interpreter and no logical system can prevent
this totally, trying to 'picking the spots' to try to do that seems an
arbitrary exercise to me.  (Regarding the recent mention of 'metrics',
I've always liked binary ones, such as "does the user find the dbms's
behavviour consistent?" or "is it intuitive?".  I also noticed that Codd
advocates that users should be aware of view definitions, contrary, I
think, to D&D!)

(When if comes to implementations, I think that Codd is in basic harmony
with D&D with his emphasis on "assignment".  Also, it's been many years
since I read that book all the way through and I was certainly even less
competent then to read between the lines, so if anybody else wants to
discount my reading, I'd be glad to hear that.  Also, for those who are
interested, acm.org lets you download this book for free, all you have
to do is enable their 'free web' account.)
paul c - 25 May 2008 01:15 GMT
Hey, slightly off-topic I admit, but just tuned in the Stanley Cup
playoffs, which I wouldn't normally, but this series has beautiful
players on both sides who play a beautiful style.  Anyway, the 'gal who
sang the US anthem (no Canuck this time, but we don't have much of a
song compared to the Yanks, French and Russians), first got out her
little harmonica tuner to check her tune before starting that grand
tune.  After all that she was still flat.  Talk about mystic trust in
technology!
Brian Selzer - 25 May 2008 03:43 GMT
> ...  And by the way, I suggest you read Codd's book.
>> Pages 89-90 describe the Update operator and the justification for it.
[quoted text clipped - 7 lines]
> sentence.  Clearly, he is talking about an operator, not just a word.
> That aside, his intentions on this topic have often perplexed me.

Unless and until you agree that

(1) a database value is a snapshot of the micro-world that the database is
supposed to model,
(2) values within that snapshot map to objects in that micro-world and
(3) an object in the micro-world can differ in appearance between snapshots,
yet still be the same object,

then you will remain perplexed.  For example:

Suppose that in one snapshot you have represented three people in line at
the bank: one is wearing a read coat, one is wearing a blue coat, and one is
wearing a green coat.
And that in the very next snapshot you also have represented three people in
line, but in this case one is wearing a read coat, one is wearing a brown
coat, and one is wearing a green coat.

Is the person wearing a brown coat represented in the second snapshot a
different person from the one represented in the first?  Or is it the same
person with a different coat?

You can't tell by simply examining the snapshots side by side as would be
the case if the second snapshot were the result of a delete followed by an
insert--there's no stated correlation between what is deleted and what is
inserted (the person in the brown coat could be the person in the blue
coat's twin), but if the second snapshot was the result of an update that
targeted the value that maps to the person wearing the blue coat, then there
would be no doubt as to whether the person in the blue coat is the person in
the brown coat.

Clearly there is a significant difference between an update and a delete
followed by an insert.  It should be obvious that D&D's alternative
definition that you refer to below does not acknowledge that difference,
since it projects away that which correlates the existing values to the
proposed values, making it impossible to differentiate between an update and
a delete followed by an insert.

> To quote the start of that section: "In managing a database, it may be
> necessary occasionally to change the values of one or more components of
[quoted text clipped - 44 lines]
> interested, acm.org lets you download this book for free, all you have
> to do is enable their 'free web' account.)
paul c - 25 May 2008 03:51 GMT
>> ...  And by the way, I suggest you read Codd's book.
>>> Pages 89-90 describe the Update operator and the justification for it.
[quoted text clipped - 12 lines]
> (1) a database value is a snapshot of the micro-world that the database is
> supposed to model,
...

bs, so is the rest.  a modern digital camera would do better than a
digital computer ever could.
Brian Selzer - 25 May 2008 05:58 GMT
>>> ...  And by the way, I suggest you read Codd's book.
>>>> Pages 89-90 describe the Update operator and the justification for it.
[quoted text clipped - 16 lines]
> bs, so is the rest.  a modern digital camera would do better than a
> digital computer ever could.

Are you really that thick, or are you just having fun at my expense?  I'm
not really in the mood to be the butt of your little joke.
Marshall - 25 May 2008 07:44 GMT
> >>> ...  And by the way, I suggest you read Codd's book.
> >>>> Pages 89-90 describe the Update operator and the justification for it.
[quoted text clipped - 19 lines]
> Are you really that thick, or are you just having fun at my expense?  I'm
> not really in the mood to be the butt of your little joke.

Brian,

Surely you must be aware by now that your position with regard
to identity is a minority opinion, yes? I mean, regardless of
whether it is right or wrong, you do know it's not a widely
held view. (At least here in c.d.t. I imagine you'd get a different
reception from a different crowd.) Right?

Marshall
Brian Selzer - 25 May 2008 13:10 GMT
>> >>> ...  And by the way, I suggest you read Codd's book.
>> >>>> Pages 89-90 describe the Update operator and the justification for
[quoted text clipped - 32 lines]
>
> Marshall

I'm aware of it, but I don't understand it: my dog is still my dog
regardless of whether he is dry or wet or covered in mud.  The majority
opinion just doesn't make sense.  But then, a majority once held that the
world was flat, so there's still a glimmer of hope :-)
paul c - 25 May 2008 16:27 GMT
> I'm aware of it, but I don't understand it: my dog is still my dog
> regardless of whether he is dry or wet or covered in mud.  The majority
> opinion just doesn't make sense.  But then, a majority once held that the
> world was flat, so there's still a glimmer of hope :-)

They are the minority now.
Bob Badour - 25 May 2008 16:38 GMT
>> I'm aware of it, but I don't understand it: my dog is still my dog
>> regardless of whether he is dry or wet or covered in mud.  The
>> majority opinion just doesn't make sense.  But then, a majority once
>> held that the world was flat, so there's still a glimmer of hope :-)
>
> They are the minority now.

Apparently, Selzer thinks his dog is a formal abstraction. My own dogs
are not very amenable to sybolic manipulation, and while I have no
direct knowledge of his dog, I suspect the same is true. Heck, it's hard
enough getting my dogs to let me trim their nails!
paul c - 25 May 2008 17:26 GMT
... My own dogs
> are not very amenable to sybolic manipulation, and while I have no
> direct knowledge of his dog, I suspect the same is true. Heck, it's hard
> enough getting my dogs to let me trim their nails!

Can't prove it but sometimes I think liking dogs is more than helpful,
it's a pre-requisite.  Have known mystics in other fields who didn't
like dogs, thought as humans they weren't quite fully formed and
generally less aware/capable/alive in nearly all pursuits.  Even had a
company with a dog president, but we never imagined the company was
real, even though the dog seemed real to all, even mystics, and the
'company' made money.  I drew the line at the teddy bear company whose
managing director attended all meetings but never spoke once.
paul c - 25 May 2008 15:34 GMT
...
>> bs, so is the rest.  a modern digital camera would do better than a
>> digital computer ever could.
>
> Are you really that thick, or are you just having fun at my expense?  I'm
> not really in the mood to be the butt of your little joke.

When talking about just what a database value is, you need to use words
such as abstraction, distortion, figment and embellishment, sometimes
even distraction, otherwise you fall prey to wishful thinking and
mysticism.  This is quite different from talking about how to use one.
I've heard similar said about mathematics.  I wouldn't come here if it
wasn't fun.
Brian Selzer - 25 May 2008 16:25 GMT
> ...
>>> bs, so is the rest.  a modern digital camera would do better than a
[quoted text clipped - 8 lines]
> This is quite different from talking about how to use one. I've heard
> similar said about mathematics.  I wouldn't come here if it wasn't fun.

All that is needed is to be able to separate and keep separate what is in
the database and what is represented in the database.  From its inception it
was always intended that what is in the database map to what is represented
in the database.  From page 25 of Codd's book:

       the concepts of keys in the relational model were always intended
       to identify objects in the micro-world that the database is supposed
       to represent.  In other words, keys in the relational model act as
       surrogates for the objects being modeled.

Certainly if you blur the distinction between what is in the database and
what is represented in the database, you're asking for trouble.  But simply
acknowledging the existence of the micro-world and the objects contained
within does not put you at risk of falling prey to wishful thinking and
mysticism.
paul c - 25 May 2008 16:34 GMT
> Certainly if you blur the distinction between what is in the database and
> what is represented in the database, you're asking for trouble.  But simply
> acknowledging the existence of the micro-world and the objects contained
> within does not put you at risk of falling prey to wishful thinking and
> mysticism.

Right, so let's have no talk of objects in databases.

(Nor entities too.)