Re: newbie table design question

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Andrew Smith <laconical(at)gmail(dot)com>
Cc: björn lundin <b(dot)f(dot)lundin(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: newbie table design question
Date: 2009-06-02 13:36:37
Message-ID: b42b73150906020636g113b5f48s30a7b9d06b548288@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2009/6/1 Andrew Smith <laconical(at)gmail(dot)com>:
> 2009/6/2 björn lundin <b(dot)f(dot)lundin(at)gmail(dot)com>
>>
>> > CREATE TABLE "DataImport"
>> > (
>> >   "DataImportID" serial NOT NULL PRIMARY KEY,
>> >   "Time" timestamp without time zone NOT NULL,
>> >   "ID_ABC" integer NOT NULL,
>> >   "ID_DEF" integer NOT NULL,
>> >   "ID_HIJ" integer NOT NULL,
>> >   etc
>> > );
>>
>> Perhaps you want to not use the "" around the table and column names.
>> It makes them case sensitive
>
> Yes, that's exactly why I've got them there. I can't stand lowercase field
> names in tables.

well, beauty is in the eye of the beholder and all that, but I'd
advise rethinking your style. On technical grounds I'd argue that you
may run into 3rd party software that is not aware of postgresql case
folding conventions that could lead to trouble.

On style grounds I'd argue that forcing all your field names to be
explicitly cases is basically crazy. It's problematic for some client
languages requiring extra escaping when you otherwise wouldn't need
it. Style and conventions are supposed to make things easier for the
programmer, not harder. I'd also advise moving 'ID' and all other
name clarifying names from the prefix to the suffix. Good for you
though and spelling out DataImportID and not using 'ID' which is
problematic for other reasons.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Carlos Oliva 2009-06-02 13:44:44 Schema, databse, or tables in different system folder
Previous Message Carlos Oliva 2009-06-02 13:34:15 Schema, database, or tables in different folders?