Re: ID column naming convention

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: ID column naming convention
Date: 2015-10-13 17:43:55
Message-ID: 561D42DB.2070304@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/13/2015 11:36 AM, droberts wrote:
> Hi, is there a problem calling ID's different when used as a FK vs table ID?
> For example
>
>
> mydimtable ()
> ID
> name
> description
>
>
> myfacttable ()
> my_dim_id # FK to ID above
> total_sales
>
>
> I 'think' if I don't enforce foreign key constraints, then this practice
> prevents tools from being able to generate ERD diagrams right?
>
>
>
> --
> View this message in context: http://postgresql.nabble.com/ID-column-naming-convention-tp5869844.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
Pretty sure _all_ ER diagramming tools rely on the DDL of column
constraints not the names. And personally I would name the column
mydim_id. i.e don't inject the extra underscore which is not in your
table name. (And I assume the table names are fake: you don't really
want "table" in table name)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lele Gaifax 2015-10-13 17:54:57 Re: Understanding "seq scans"
Previous Message droberts 2015-10-13 17:36:21 ID column naming convention