Re: ID column naming convention - Mailing list pgsql-general

From Rob Sargent
Subject Re: ID column naming convention
Date
Msg-id 561D42DB.2070304@gmail.com
Whole thread Raw
In response to ID column naming convention  (droberts <david.roberts@riverbed.com>)
List 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 ()IDnamedescription


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)

pgsql-general by date:

Previous
From: droberts
Date:
Subject: ID column naming convention
Next
From: Lele Gaifax
Date:
Subject: Re: Understanding "seq scans"