Re: rationale behind quotes for camel case? - Mailing list pgsql-general

From Greg Smith
Subject Re: rationale behind quotes for camel case?
Date
Msg-id 4E0A5DA8.9020803@2ndQuadrant.com
Whole thread Raw
In response to Re: rationale behind quotes for camel case?  (dennis jenkins <dennis.jenkins.75@gmail.com>)
List 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@2ndQuadrant.com   Baltimore, MD
Comprehensive and Customized PostgreSQL Training Classes:
http://www.2ndquadrant.us/postgresql-training/



pgsql-general by date:

Previous
From: Rick Genter
Date:
Subject: Re: DROP TABLE Appears to Fail
Next
From: Rob Sargent
Date:
Subject: Re: Multi-tenancy in Postgres