Re: ID column naming convention

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: ID column naming convention
Дата
Msg-id 561D42DB.2070304@gmail.com
обсуждение исходный текст
Ответ на ID column naming convention  (droberts <david.roberts@riverbed.com>)
Список 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 по дате отправления:

Предыдущее
От: droberts
Дата:
Сообщение: ID column naming convention
Следующее
От: Lele Gaifax
Дата:
Сообщение: Re: Understanding "seq scans"