From dev-return-11779-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Sat May 09 01:59:53 2009 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 48191 invoked from network); 9 May 2009 01:59:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 May 2009 01:59:53 -0000 Received: (qmail 95886 invoked by uid 500); 9 May 2009 01:59:53 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 95809 invoked by uid 500); 9 May 2009 01:59:52 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 95799 invoked by uid 99); 9 May 2009 01:59:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 May 2009 01:59:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tim.mcconne@gmail.com designates 74.125.46.31 as permitted sender) Received: from [74.125.46.31] (HELO yw-out-2324.google.com) (74.125.46.31) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 May 2009 01:59:41 +0000 Received: by yw-out-2324.google.com with SMTP id 3so979528ywj.63 for ; Fri, 08 May 2009 18:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=x2qXM4bbU+CXXEaUsD6LVjOuBayVvuNA4IsFTtaoewo=; b=ZmoX1D8Zxwf4ixXzFe79s74BSmTxvJraQ7EooDC3kSZBj+S2RCkyR+J31kkJiEGAH8 xU6pfAKO9sEveGc7Oz7MlfopSpcdfmYZg0Z1BIGMDyC7gIj9faaRu3xDhl3Vh3ZVo/GJ vSfSyyEQIIZRTNMcmeNq4NUP/a3xbzKgZRf/s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=vEonh+k+qSzIOjseyILWauOCfIH9cskqnnZeZMOTGsG2AnpoYOovJ9jn5a0b0dhFaz V1gbwD5eHUdY3wpdUtfzAK1IEagcjYZoPKdJslzJAhT7vfGO2uLUGkzlNFZbV3++kjWl vFUVAhySVZb/3Y3fetmH6PsIUNrqEKCLlPTUw= Received: by 10.90.81.11 with SMTP id e11mr3620706agb.119.1241834361014; Fri, 08 May 2009 18:59:21 -0700 (PDT) Received: from ?9.51.245.56? ([32.97.110.55]) by mx.google.com with ESMTPS id 9sm2503960agc.22.2009.05.08.18.59.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 08 May 2009 18:59:20 -0700 (PDT) Message-ID: <4A04E36D.2090207@gmail.com> Date: Fri, 08 May 2009 21:59:09 -0400 From: Tim McConnell User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: "[OPNEJPA] DEV-List" Subject: Valid table/column names Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 ?? -- Thanks, Tim McConnell