> > I don't want to pick an endless stream of specific examples apart, so I
> will
[quoted text clipped - 10 lines]
> phone and discuss their job with a helpline, administrator or work
> colleague.
I'm still not getting it. I won't assume there is nothing to get, but I
need it explained to me some more. What does the job number itself tell the
user?
> In an ideal world maybe they could press some button to get the desired
> effect, but in practice there's more involved than pressing buttons - some
> debate between humans!
Exactly. That is precisely the point I am getting at. Humans need facts so
they can debate and decide. A job number is just an indirection to the
facts. Unless it adds value, it adds cost.
> The really important thing is that the user can simply identify the job in
> question and they have no problem in doing that.
Nope, you're going to have to explain this to me. A number doesn't identify
anything. It might discriminate between things, but by itself that is not
useful.
> I suspect that if I'd
> called it a transaction number and used text there wouldn't be much of an
> argument, but in practice a simple numeric value does nicely and auto
> increment would work nicely too.
Oh, we don't want to go THERE! I seriously doubt that we share an idea of
what a transaction is and how it is properly defined. I am about to leave
on holiday and I don't have time to get into that one! :-)
> > The user can know that a job is urgent or in trouble only because
> > of the intrinsic facts about that job. The only slight advantage of a
[quoted text clipped - 3 lines]
> your comfortable with a command line interface using such a value, you can't
> dismiss the use of these artificial keys in general.
Agreed, but we don't see too many users asking for command-line interfaces
these days. And properly so.
> >, but
> > the user would almost certainly prefer a GUI even if they had a shorthand
[quoted text clipped - 3 lines]
> They do have a GUI and they still will refer to the job number - infinitely
> preferable to the 12th job submitted at 11:01 for the payroll run..
I need more persuading. To my eye this example looks like they're not
getting enough facts, not that they don't have a job number.
> > > So, this is a case where I'd use an artificial key that's exposed to the
> > > user.
[quoted text clipped - 14 lines]
> I will agree with that, but I suspect that people sometimes use data that
> they consider to be immutable in keys when it is not immutable.
I don't insist that it be immutable, and nor does SQL, and nor does Ingres.
When we define a foreign key constraint, and we find that the referenced key
is mutable (because users do make typos and not all data carry a
check-digit), we should make the FK constraint ON UPDATE CASCADE. Thus when
the referenced key is updated/corrected, the correction is propagated
everywhere automatically, no matter what program was used to update the
table. (I completely agree that one would prefer not to have to update keys
in that way too often, for purely practical performance reasons, but it is
not very expensive as it turns out. And coding it is dirt cheap.)
Roy Hann (rhann at rationalcommerce dot com)
Rational Commerce Ltd.
www.rationalcommerce.com
"Ingres development, tuning, and training experts"
Paul Andrews - 20 Jul 2005 13:25 GMT
> > > I don't want to pick an endless stream of specific examples apart, so I
> > will
[quoted text clipped - 25 lines]
> they can debate and decide. A job number is just an indirection to the
> facts. Unless it adds value, it adds cost.
The humans only need the job number to find the other facts. The use of the
job number simplifies lookup by humans and by query - reducing cost..
> > The really important thing is that the user can simply identify the job in
> > question and they have no problem in doing that.
>
> Nope, you're going to have to explain this to me. A number doesn't identify
> anything. It might discriminate between things, but by itself that is not
> useful.
Lets suppose they submit 25 jobs. Each job has 5 parameters. The first
parameter might be department, the second might be the job type, the third
might be a start date, the fourth an end date, etc.
If they have an enquiry about a given job (for example it's run but nothing
came out of the printer) it's far easier to say that "I have a problem with
job 486", rather than say "I have a problem with my job for department A,
type payroll, with a start date of 1/4/05 that was submitted at about
11:01 - ignore the same job that was put in by by colleague at almost the
same time".
In pure convenience terms, these jobs sometimes have related tables holding
extra parameters and rather than hold a complicated foreign key refering to
the job queue , they just refer to the job number in the queue that they
relate to.
Does that help?
> > I suspect that if I'd
> > called it a transaction number and used text there wouldn't be much of an
[quoted text clipped - 4 lines]
> what a transaction is and how it is properly defined. I am about to leave
> on holiday and I don't have time to get into that one! :-)
I didn't have SQL transactions in mind - a tracking number for example.
> > > The user can know that a job is urgent or in trouble only because
> > > of the intrinsic facts about that job. The only slight advantage of a
[quoted text clipped - 61 lines]
> Info-ingres@cariboulake.com
> http://mailman.cariboulake.com/mailman/listinfo.py/info-ingres
Roy Hann - 20 Jul 2005 14:31 GMT
> > > In an ideal world maybe they could press some button to get the desired
> > > effect, but in practice there's more involved than pressing buttons -
[quoted text clipped - 8 lines]
> The humans only need the job number to find the other facts. The use of the
> job number simplifies lookup by humans and by query - reducing cost..
I'm about to leave for sunnier climes so I am simply going to toss the towel
in here. One can discover examples where synthetic keys are truly useful,
and I think we've agreed on that all along. My purpose in arguing about
this has been to plant a seed of doubt that synthetic keys (and surrogate
keys) are as useful as (I think) we generally assume. They're not.
Roy
Paul Andrews - 20 Jul 2005 14:50 GMT
> > > > In an ideal world maybe they could press some button to get the
> desired
[quoted text clipped - 19 lines]
>
> Roy
OK, have a great holiday!
Paul