[Maypole] Maypole::Plugin::Relationships and YAML
Aaron Trevena
Aaron Trevena <aaron.trevena@gmail.com>
Wed, 2 Feb 2005 09:51:04 +0000
On Wed, 2 Feb 2005 07:56:44 +0000, Tony Bowden <tony-maypole@kasei.com> wrote:
> PK's should *always* be meaningless.
not *meaningless*, they mean a unique identifier for whatever they are
PK for. But you are right they should not have a meaning beyond that.
> Adding data in about things like part numbers, tray numbers etc leads to
> a world of pain when supposedly invariable data changes, as, invariably,
> happens.
Amen brother.
I have just been dealing with a company via a webservices and they
helpfully provided stock_codes for each item. Yes, that stock code was
user defined.... and guess what before we even did a weeks development
those values were changing and dissappearing.
never ever ever re-use something else as an identifier. Either you
don't need an identifier and can use a compound key of non-unique
fields that is unique to that record or you need an identifier that is
reliable, unchanging and unique.
I can't believe I had to ask these people for real unique id's,
explaining why it was important.
A.