From: | dennis jenkins <dennis(dot)jenkins(dot)75(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: rationale behind quotes for camel case? |
Date: | 2011-06-28 16:09:52 |
Message-ID: | BANLkTimBcyAFm0=+FUH3YKof-MMJydfJ5A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jun 28, 2011 at 8:43 AM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
>
> The rebuttal to the above points is that the problem with not quoting
> is that your identifiers are folded to lower case on the server which
> can make them difficult to read in psql, pgadmin, etc. when outputted.
> This is true and I consequently use underscores to break up words in
> my personal style (order_number, not OrderNumber), avoiding that
> problem. Some people don't like it, but it is the easiest to type,
> the most tool friendly, and most regular.
>
> merlin
>
>
(wandering slightly off-topic)
Any suggestions on how to name tables when table names contain both
multi-word nouns and mutli-table "many-many" mappings?
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".
However, I find the above distasteful, for many of the reasons that Merlin
and others have outlined. Yet naming the table "foo_bar_biz" seems
ambiguous to me, as does using just lower-case "foo_barbiz" / "barbiz".
These examples are contrived. The real table names are normal English words
with subjective meaning.
I'd like in ask the pgsql community for suggestions on how they name tables.
Thank you all for your time.
From | Date | Subject | |
---|---|---|---|
Next Message | David Greco | 2011-06-28 18:34:30 | PLPGSQL SETOF functions |
Previous Message | Radoslaw Smogura | 2011-06-28 15:29:05 | Re: Gist Index: Problem getting data in GiST Support Functions "penalty". |