Re: Database column names.

From: Philip Lijnzaad <lijnzaad_at_ebi.ac.uk>
Date: 10 May 2001 11:29:07 +0100
Message-ID: <u77kzp4hvw.fsf_at_sol6.ebi.ac.uk>


Hi,

On Thu, 10 May 2001 09:37:51 +0100,
"Lee" == Lee Osborne <osbornelee_at_hotmail.com> wrote:

Lee> NAMING CONVENTION 1.
Lee> SQL column:
Lee>    . your_full_name
Lee> On-screen display:
Lee>    . Your full name
Lee> HTML:
Lee>     . Your full name: <input name="your_full_name" value="$your_full_name">

Lee> NAMING CONVENTION 2
Lee> SQL column:
Lee>    . yourFullName
Lee> On-screen display:
Lee>     . Your Full Name

Lee> HTML:
Lee> . Your full name: <input name="yourFullName" value="$yourFullName">

Lee> I personally prefer the second convention for readability and efficiency.

why efficiency? String mangling foo_bar into "Foo Bar" costs practically nothing, and the extra few bytes for the "_"'s should be neglible as well.

Lee> I want to make my programs as portable and platform independant as Lee> possible.

in that case, use the foo_bar convention, since SQL databases are not required to preserve the case of the table or column names. E.g. if you dynamically acquire the column names from the Data Dictionary (which is what I assumed are doing all along), then you will get them in all upper case for Oracle, and prolly others as well. It also leavesyou more leeway, since you can change the capitalization conventions without changing your database schema.

                                                                      Philip
-- 
If you have a procedure with 10 parameters, you probably missed some. (Kraulis)
-----------------------------------------------------------------------------
Philip Lijnzaad, lijnzaad_at_ebi.ac.uk \ European Bioinformatics Institute,rm A2-08

+44 (0)1223 49 4639 / Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax) \ Cambridgeshire CB10 1SD, GREAT BRITAIN
PGP fingerprint: E1 03 BF 80 94 61 B6 FC 50 3D 1F 64 40 75 FB 53
Received on Thu May 10 2001 - 12:29:07 CEST

Original text of this message