openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim McConnell <>
Subject Valid table/column names
Date Sat, 09 May 2009 01:59:09 GMT
Hi, I'm wondering if anyone recalls the rationale for making table and/or column 
names valid by appending number(s) to the end of the name (i.e., DATE --> DATE0, 
TIME--> TIME1) ??  I ask for a number of reasons. Primarily I'm just trying to 
understand, but many of the SLQ92 reserved words/keys in the sql-keywords.rscs 
file can be, and are used, as valid column names. For example, NAME, VALUE, and 
NUMBER are SQL92 reserved keywords, but they're frequently used as valid column 
names without being converted to NAME0, VALUE0, or NUMBER0.

So, this mechanism for creating valid column names by appending numbers when 
reserved keywords are involved doesn't seem to be uniformly applied, or at least 
it's not obvious to me. Finally, many of the major database products (e.g., DB2, 
Oracle) support the usage of reserved keywords if they are explicitly enclosed in 
double quotes (e.g., "TIMESTAMP", "DATE", "TIME"). I wonder if it might be more 
intuitive and less problematic to utilize this technique when the database 
supports it ??

Tim McConnell

View raw message