Re: A problem in SQL (a real challenge)
From: Philip Lijnzaad <lijnzaad_at_ebi.ac.uk>
Date: 2000/05/12
Message-ID: <u7vh0k19k4.fsf_at_o2-3.ebi.ac.uk>#1/1
Date: 2000/05/12
Message-ID: <u7vh0k19k4.fsf_at_o2-3.ebi.ac.uk>#1/1
Gene> What if it is not abuse? I write/support a client billing system Gene> where it is possible to have more than one transaction with what might Gene> be considered the primary key. These are generally dealt with in a Gene> group. It is usually irrelevant to my boss which order they are Gene> listed in, but a transaction number can be entered to force a Gene> particular order. Whether the group has one transaction in it or more Gene> is irrelevant: all of the transactions will be consolidated for the Gene> invoice.
Seems like a recipe for disaster to me: how can you ever know that two $100 items are real separate items, rather than an error? Having a proper key (and enforcing it using a constraint) helps a bit against this. Of course if won't help against entering it erroneously, but that's another matter. And with the key at least it's easy to get of the duplicates in a portable way.
Philip
-- /dev/brain: character special (53/0) ----------------------------------------------------------------------------- Philip Lijnzaad, lijnzaad_at_ebi.ac.uk | European Bioinformatics Institute,rm A2-24Received on Fri May 12 2000 - 00:00:00 CEST
+44 (0)1223 49 4639 | Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax) | Cambridgeshire CB10 1SD, GREAT BRITAIN
PGP fingerprint: E1 03 BF 80 94 61 B6 FC 50 3D 1F 64 40 75 FB 53