You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@empire-db.apache.org by Rainer Döbele <do...@esteam.de> on 2010/01/28 21:56:25 UTC

second call for a better name

Hello everyone,

any idea for a better name than DataMode for our new enum anyone?

The requirements are:
- The enum contains the items ReadOnly, Nullable (or Optional), NotNull (or Required), AutoGenerated
- The name should be short (<=8) to keep data definitions small
- It should be understandable.

How about:
- Mode
- Modifier
- Mod (short for Modifier)
- (just) M
- Def
- Xtra
- X
- Claim (would semantically be right but sounds odd, doesn't it?)

Here is an example of where it is used (see DataMode...):

DEPARTMENT_ID   = addColumn("DEPARTMENT_ID",    DataType.AUTOINC,       0, DataMode.AutoGenerated, "DEP_ID_SEQUENCE");
NAME            = addColumn("NAME",             DataType.TEXT,         80, DataMode.NotNull);
HEAD            = addColumn("HEAD",             DataType.TEXT,         80, DataMode.Nullable);
BUSINESS_UNIT   = addColumn("BUSINESS_UNIT",    DataType.TEXT,          4, DataMode.NotNull, "ITTK");
UPDATE_TIMESTAMP= addColumn("UPDATE_TIMESTAMP", DataType.DATETIME,      0, DataMode.AutoGenerated);

Looking forward for your responses.

Regards
Rainer


> -----Ursprüngliche Nachricht-----
> Von: McKinley [mailto:mckinley1411@gmail.com]
> Gesendet: Mittwoch, 27. Januar 2010 01:45
> An: empire-db-dev@incubator.apache.org
> Betreff: Re: DataType.AUTOINC Probably Needs a Change
> 
> On Wed, Jan 27, 2010 at 12:01 AM, Rainer Döbele <do...@esteam.de>
> wrote:
> > I am not too happy about the name of the enum (DataMode) but I have
> been thining and trying out various
> 
> DataMeta? Joking, joking.
> 
> Thanks for this patch!

re: second call for a better name

Posted by Rainer Döbele <do...@esteam.de>.
Francis De Brabandere wrote:
> Re: second call for a better name
> 
> > - The enum contains the items ReadOnly, Nullable (or Optional),
> NotNull (or Required), AutoGenerated
> This somehow sounds as putting different things into one enum... Is
> this also one property in most databases?
> 
They are not really different things but correlated. Nullable and NotNull are only valid for updateable fields. ReadOnly and AutoGenerated columns are not updateable (this question here is whether we really need both of them). 
ReadOnly may not be used for Tables (only for views and beans).

Regards
Rainer


Re: second call for a better name

Posted by Francis De Brabandere <fr...@gmail.com>.
> - The enum contains the items ReadOnly, Nullable (or Optional), NotNull (or Required), AutoGenerated
This somehow sounds as putting different things into one enum... Is
this also one property in most databases?

> How about:

OK
> - Mode
> - Modifier
> - Mod (short for Modifier)

NOK
> - (just) M
> - Def
> - Xtra
> - X

Can't think of anything better...

Odd indeed
> - Claim (would semantically be right but sounds odd, doesn't it?)
>
> Here is an example of where it is used (see DataMode...):
>
> DEPARTMENT_ID   = addColumn("DEPARTMENT_ID",    DataType.AUTOINC,       0, DataMode.AutoGenerated, "DEP_ID_SEQUENCE");
> NAME            = addColumn("NAME",             DataType.TEXT,         80, DataMode.NotNull);
> HEAD            = addColumn("HEAD",             DataType.TEXT,         80, DataMode.Nullable);
> BUSINESS_UNIT   = addColumn("BUSINESS_UNIT",    DataType.TEXT,          4, DataMode.NotNull, "ITTK");
> UPDATE_TIMESTAMP= addColumn("UPDATE_TIMESTAMP", DataType.DATETIME,      0, DataMode.AutoGenerated);
>
> Looking forward for your responses.
>
> Regards
> Rainer
>
>
>> -----Ursprüngliche Nachricht-----
>> Von: McKinley [mailto:mckinley1411@gmail.com]
>> Gesendet: Mittwoch, 27. Januar 2010 01:45
>> An: empire-db-dev@incubator.apache.org
>> Betreff: Re: DataType.AUTOINC Probably Needs a Change
>>
>> On Wed, Jan 27, 2010 at 12:01 AM, Rainer Döbele <do...@esteam.de>
>> wrote:
>> > I am not too happy about the name of the enum (DataMode) but I have
>> been thining and trying out various
>>
>> DataMeta? Joking, joking.
>>
>> Thanks for this patch!
>



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.