Re: rationale behind quotes for camel case?

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: rationale behind quotes for camel case?
Date: 2011-06-28 23:03:04
Message-ID: 4E0A5DA8.9020803@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/28/2011 12:09 PM, dennis jenkins wrote:
> Example: Suppose that I have a table called "foo" and another table
> called "barBiz" (or "bar_biz" if you prefer). Further, both of these
> tables have a "serial" primary key. Now I want to create a third
> table that represents a many-to-many relationship between "foo" and
> "barBiz". So far I have been keeping compound-noun table names in
> camel case, but mapping tables separate the base table names with
> underscores. Thus the table name would be "foo_barBiz".

The options are basically:

1) Use case to help sort this out

2) Use lots of underscores and cope with the ambiguity

3) Pick something to put in the middle to represent relationships
between things, to make them less ambiguous. You might name this
foo_to_barbiz or the compact but expressive foo2barbiz as two examples.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
Comprehensive and Customized PostgreSQL Training Classes:
http://www.2ndquadrant.us/postgresql-training/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2011-06-28 23:04:54 Re: Multi-tenancy in Postgres
Previous Message Rick Genter 2011-06-28 22:57:17 Re: DROP TABLE Appears to Fail