Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 76771 invoked from network); 1 May 2005 02:20:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 May 2005 02:20:10 -0000 Received: (qmail 27912 invoked by uid 500); 1 May 2005 02:21:34 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 27880 invoked by uid 500); 1 May 2005 02:21:33 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 27866 invoked by uid 99); 1 May 2005 02:21:33 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 30 Apr 2005 19:21:33 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id E623D29C for ; Sun, 1 May 2005 04:20:05 +0200 (CEST) Message-ID: <385324144.1114914005941.JavaMail.jira@ajax.apache.org> Date: Sun, 1 May 2005 04:20:05 +0200 (CEST) From: "Tomohito Nakayama (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-252) polishing up idea of default value including auto increment of a column in table Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N polishing up idea of default value including auto increment of a column in table -------------------------------------------------------------------------------- Key: DERBY-252 URL: http://issues.apache.org/jira/browse/DERBY-252 Project: Derby Type: Task Components: Documentation Reporter: Tomohito Nakayama Priority: Minor This is not bug. However, there exists some complexity in the part of default value and autoincrement value in current implementation of derby. Take aside whether any modification to be done or not for this issue, polishing up the idea of default including autoincrement would be help thinking about default and autoincrement. Next is my idea for default... "default value of the column" is value which registered to the column when a record was inserted without any value. "default value of the column" can be one of the next. def_1: default does not exist def_2: constant value def_3: generated by a rule def_3-1: autoincrement value def_3-2: value generated by more complex rule than autoincrement (This does not exists in derby) There exists question wheter def_3 is truly default or not. In the current implementation of derby, object interfaced as "org.apache.derby.catalog.DefaultInfo" was externalized to "COLUMNDEFAULT" of "SYS_COLUMNS" in the case of def_2, and the object have information of what constant value is used as default value. On the other hand, information about autoincrement value was stored to "IDENTITYCOLUMNVALUE", "IDENTITYCOLUMNSTART", "IDENTITYCOLUMNINC" of "SYS_COLUMNS". There exists question in the case of def_3, why information about autoincrement value does not exist in DefaultInfo. One answer for this question is that storing information in "IDENTITYCOLUMNVALUE" to DefaultInfo would cause performance trouble, because this will cause re-storing all information of DefaultInfo always when record was inserted and next autoincrement value was prepared. But this answer does not explan about information of "IDENTITYCOLUMNSTART", "IDENTITYCOLUMNINC". -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira