Return-Path: Delivered-To: apmail-incubator-empire-db-dev-archive@minotaur.apache.org Received: (qmail 96796 invoked from network); 8 Feb 2010 23:10:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Feb 2010 23:10:47 -0000 Received: (qmail 74321 invoked by uid 500); 8 Feb 2010 23:10:47 -0000 Delivered-To: apmail-incubator-empire-db-dev-archive@incubator.apache.org Received: (qmail 74282 invoked by uid 500); 8 Feb 2010 23:10:47 -0000 Mailing-List: contact empire-db-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: empire-db-dev@incubator.apache.org Delivered-To: mailing list empire-db-dev@incubator.apache.org Received: (qmail 74219 invoked by uid 99); 8 Feb 2010 23:10:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 23:10:47 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [88.79.172.157] (HELO mail.esteam.de) (88.79.172.157) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 23:10:40 +0000 Content-class: urn:content-classes:message Subject: Once again looking for a better name Date: Tue, 9 Feb 2010 00:09:57 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CAA913.E0D6FCD8" Message-ID: X-MIMEOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Once again looking for a better name Thread-Index: AcqpE9TOpLfxGYWAQ1OOODE36i0OLQ== From: =?iso-8859-1?Q?Rainer_D=F6bele?= To: , ------_=_NextPart_001_01CAA913.E0D6FCD8 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi everyone, =20 I have already raised this question twice but had no satisfactory = answer, so I am hereby trying again: =20 Generally I think it is a great idea to specify the Nullable, NotNull, = AutoGenerated capabilities of a column with an enum rather than boolean = as before. The main advantage is the readability of the data model definition. Currently we're using an enumeration called DataMode simply because I = could not think of a better name at the time. But I don't think the name is good. There must be something better. This is what it looks like at the moment: =20 // Example for "DataMode" DEPARTMENT_ID =3D addColumn("DEPARTMENT_ID", DataType.AUTOINC, = 0, DataMode.AutoGenerated, "DEP_ID_SEQUENCE"); NAME =3D addColumn("NAME", DataType.TEXT, = 80, DataMode.NotNull); HEAD =3D addColumn("HEAD", DataType.TEXT, = 80, DataMode.Nullable); BUSINESS_UNIT =3D addColumn("BUSINESS_UNIT", DataType.TEXT, = 4, DataMode.NotNull, "ITTK"); UPDATE_TIMESTAMP=3D addColumn("UPDATE_TIMESTAMP", DataType.DATETIME, = 0, DataMode.AutoGenerated); =20 Since the enum reflect the update capabilities of a column how about UDC = (short for update capabilities): // Example for "Udc" DEPARTMENT_ID =3D addColumn("DEPARTMENT_ID", DataType.AUTOINC, = 0, UDC.AutoGenerated, "DEP_ID_SEQUENCE"); NAME =3D addColumn("NAME", DataType.TEXT, = 80, UDC.NotNull); HEAD =3D addColumn("HEAD", DataType.TEXT, = 80, UDC.Nullable); BUSINESS_UNIT =3D addColumn("BUSINESS_UNIT", DataType.TEXT, = 4, UDC.NotNull, "ITTK"); UPDATE_TIMESTAMP=3D addColumn("UPDATE_TIMESTAMP", DataType.DATETIME, = 0, UDC.AutoGenerated); =20 What about Caps // Example for "Caps" DEPARTMENT_ID =3D addColumn("DEPARTMENT_ID", DataType.AUTOINC, = 0, Caps.AutoGenerated, "DEP_ID_SEQUENCE"); NAME =3D addColumn("NAME", DataType.TEXT, = 80, Caps.NotNull); HEAD =3D addColumn("HEAD", DataType.TEXT, = 80, Caps.Nullable); BUSINESS_UNIT =3D addColumn("BUSINESS_UNIT", DataType.TEXT, = 4, Caps.NotNull, "ITTK"); UPDATE_TIMESTAMP=3D addColumn("UPDATE_TIMESTAMP", DataType.DATETIME, = 0, Caps.AutoGenerated); =20 Or Mod (short for Modifier)? // Example for Mod DEPARTMENT_ID =3D addColumn("DEPARTMENT_ID", DataType.AUTOINC, = 0, Mod.AutoGenerated, "DEP_ID_SEQUENCE"); NAME =3D addColumn("NAME", DataType.TEXT, = 80, Mod.NotNull); HEAD =3D addColumn("HEAD", DataType.TEXT, = 80, Mod.Nullable); BUSINESS_UNIT =3D addColumn("BUSINESS_UNIT", DataType.TEXT, = 4, Mod.NotNull, "ITTK"); UPDATE_TIMESTAMP=3D addColumn("UPDATE_TIMESTAMP", DataType.DATETIME, = 0, Mod.AutoGenerated); =20 Any other ideas are also welcome. =20 BTW: Finding a good name for a class, function or variable is the most = challenging part of programming (my phrase) =20 Rainer =20 =20 ------_=_NextPart_001_01CAA913.E0D6FCD8--