Re: PostgreSQL Developer Best Practices

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL Developer Best Practices
Date: 2015-08-25 23:23:54
Message-ID: 86io83eyut.fsf@jerry.enova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:

> On 08/25/2015 01:56 PM, John R Pierce wrote:
>
>> On 8/25/2015 1:42 PM, Gavin Flower wrote:
>>> Account numbers are externally generated, and may potentially change.
>>> Management might suddenly decide that they want to start using the
>>> year the account started as the first 4 digits, or that the branch
>>> code should be reflected in it, or something else. The database
>>> should be protected from these arbitrary changes. Hence the
>>> account_no is not a good candidate for a primary key.
>>
>>
>> such practices would raise total havoc on a traditional paper ledger
>> accounting system as well as things like pending AR/AP where external
>> companies will be referencing your account numbers.
>
> Agreed, but it happens. When Lowes took over a local hardware
> chain(Eagles) here in Washington state they moved very quickly on
> changing the account numbers. The company I worked for who supplied
> Eagles and then Lowes sat on a check for $22,000 that was sent to us
> in error because the account numbers got switched. We called them when
> we got the check, but it still took them six months to own up to it.

DOH!

Next time a screwball outfit sends you a check for $22k erroneously just
go deposit it :-)

> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net
p: 312.241.7800

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-08-25 23:34:26 Re: PostgreSQL Developer Best Practices
Previous Message David G. Johnston 2015-08-25 23:20:00 Re: PostgreSQL Developer Best Practices