Subject Re: Field names upper case - true of firebird 2.0 also?
Author MichaelS
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
> At 03:46 AM 9/05/2005 +0000, you wrote:
> >I'm quite unused to firebird's apparent use of uppercase letters for
> >field names etc. Is this an acutal requirement, or is it optional?
> >What about firebird 2? If it's a requirement, why...don't like it any
> >more than I would if I was forced to type this msg in uppercase.
> >Varying case helps so much with names:
> >
> >tblItem
> >tblItem.ItemID
> >tblItem.ItemName
> >
> >Much nicer than
> >
> >TBL_ITEM
> >TBL_ITEM.ITEMID
> >TBL_ITEM.ITEMNAME
> >
> >Feels like using dBase...
> >
> >I have the firebird book
>
> See Chapter 14, pp. 218-9, "Database Object Naming Conventions and
> Constraints". Firebird's convention is in conformance with the
Standards,
> so no change is forthcoming in Firebird 2.0 to make C programmers
feel more
> cosy.
>
> >(as an ebook, what a mistake!)
>
> Agreed. As the civilised world defines an eBook, it aint no eBook.
It's a
> compositor's proof. :-( Feel free to read my comments about it at the
> IBPhoenix website. There are one or two tips there that might help
to ease
> the pain.
>
> btw, I too prefer the Pascal camel case naming conventions and use
them in
> my DDL. As long as you avoid double-quoting your object
identifiers, the
> Fb engine happily accepts any combination of case on identifiers,
both when
> declaring and altering objects and when referring to them in queries.
>
>
>
> ./heLen

Hi Helen

It's certainly a well written book. Thanks for that and I hope there
will be a revision for 2.0.

I've read the section you pointed to and I don't see anything that
seems to indicate that table names and field names must be uppercase,
quite the contrary, they seem to be allowed (first line of quoted
passage below). But, the tools I'm using seem to force upper case and
I interpreted your msg as confirming my fear that uppercase was enforced?

Database Object Naming Conventions and Constraints
The following limitations on naming database objects must be observed:
• Start each name with an alphabetic character (A–Z or a–z).
• Restrict object names to 31 characters. Some objects, such as
constraint names,
are restricted to 27 bytes in length.
• Allowable characters for database file names—as with all metadata
objects in
Firebird—include dollar signs ($), underscores (_), 0 to 9, A to Z,
and a to z.
• Observe uniqueness requirements within a database:
• In all cases, objects of the same type—all tables, for example—must be
unique.
• Column identifiers must be unique within a table. All other object
identifiers
must be unique within the database.
• Avoid the use of reserved words, spaces, diacritic characters, and
any ASCII
characters having codes higher than 127:
• In dialect 1, they cannot be used at all.
• In dialect 3, you can delimit "illegal" identifiers using pairs of
double-quote
symbols. Details follow.