Re: PostgreSQL Developer Best Practices

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
Cc: Marc Munro <marc(dot)munro(at)gmail(dot)com>, Melvin Davidson <melvin6925(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL Developer Best Practices
Date: 2015-08-25 23:20:00
Message-ID: CAKFQuwaHDE3ckoY5-WSoy=1TqA_hNM7Y3xnaFJ5Vks0A5dh-oQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 25, 2015 at 6:27 PM, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz
> wrote:

> On 26/08/15 04:33, Marc Munro wrote:
>
>> On Sat, 2015-08-22 at 15:15 +0000, Melvin Davidson wrote:
>>
>> I've been searching for a "PostgreSQL Developer Best Practices" with not
>>> much luck,
>>> so I've started my own. At the risk of stirring up a storm of
>>> controversy,
>>> I would appreciate additional suggestions and feedback.
>>>
>>> You might add: Create all relation names as plurals.
>>
>> Or, if your site uses predominantly singular names, make that the
>> standard. Consistency within the site is more important than any
>> dogmatic belief about whether singular or plural forms is better. If
>> you don't put it in the standard, someone will eventually create tables
>> with names that don't gel with everything else.
>>
>> __
>> Marc
>>
>>
>>
>>
>>
>> Actually I would suggest standardising on singular names, not JUST
> because that this the standard I prefer! :-)
>
> But (also) because:
>
> 1. Singular words tend to be shorter
>
> 2. plurals are more ambiguous wrt spelling
>
> 3. there other good reasons, that I've forgotten for now :-(
> (but I remember having them!!!)
>
>
Because my first college IS professor taught it this​

​way...I do like these other reasons though.

The fact that a table can have multiple rows is pretty much a given - and I
wouldn't suggest plural adherents name any singleton tables using the
singular form - so no information is lost. Having since learned OO the
class of something is labelled in the singular form and in many ways a
relation definition is equivalent to a class definition.

​David J.​

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jerry Sievers 2015-08-25 23:23:54 Re: PostgreSQL Developer Best Practices
Previous Message Florin Andrei 2015-08-25 23:19:51 BDR: cannot remove node from group