empire-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Bond <b...@bond-it.de>
Subject AW: Once again looking for a better name
Date Tue, 09 Feb 2010 10:16:38 GMT
PWAIN - Property without an Interessting Name :-)

Matt

-----Ursprüngliche Nachricht-----
Von: benjamin.venditti@arcor.de [mailto:benjamin.venditti@arcor.de] 
Gesendet: Dienstag, 9. Februar 2010 11:02
An: empire-db-dev@incubator.apache.org
Betreff: Aw: Once again looking for a better name

 DataMode++

Mod+

Caps --

UDC -


best regards,
benjamin



----- Original Nachricht ----
Von:     Rainer Döbele <doebele@esteam.de>
An:      empire-db-dev@incubator.apache.org, empire-db-user@incubator.apache.org
Datum:   09.02.2010 00:09
Betreff: Once again looking for a better name

> Hi everyone,
> 
>  
> 
> I have already raised this question twice but had no satisfactory answer, so
> I am hereby trying again:
> 
>  
> 
> 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:
> 
>  
> 
> // Example for "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);
> 
>  
> 
> Since the enum reflect the update capabilities of a column how about UDC
> (short for update capabilities):
> 
> // Example for "Udc"
> 
> DEPARTMENT_ID   = addColumn("DEPARTMENT_ID",    DataType.AUTOINC,       0,
> UDC.AutoGenerated, "DEP_ID_SEQUENCE");
> 
> NAME            = addColumn("NAME",             DataType.TEXT,         80,
> UDC.NotNull);
> 
> HEAD            = addColumn("HEAD",             DataType.TEXT,         80,
> UDC.Nullable);
> 
> BUSINESS_UNIT   = addColumn("BUSINESS_UNIT",    DataType.TEXT,          4,
> UDC.NotNull, "ITTK");
> 
> UPDATE_TIMESTAMP= addColumn("UPDATE_TIMESTAMP", DataType.DATETIME,      0,
> UDC.AutoGenerated);
> 
>  
> 
> What about Caps
> 
> // Example for "Caps"
> 
> DEPARTMENT_ID   = addColumn("DEPARTMENT_ID",    DataType.AUTOINC,       0,
> Caps.AutoGenerated, "DEP_ID_SEQUENCE");
> 
> NAME            = addColumn("NAME",             DataType.TEXT,         80,
> Caps.NotNull);
> 
> HEAD            = addColumn("HEAD",             DataType.TEXT,         80,
> Caps.Nullable);
> 
> BUSINESS_UNIT   = addColumn("BUSINESS_UNIT",    DataType.TEXT,          4,
> Caps.NotNull, "ITTK");
> 
> UPDATE_TIMESTAMP= addColumn("UPDATE_TIMESTAMP", DataType.DATETIME,      0,
> Caps.AutoGenerated);
> 
>  
> 
> Or Mod (short for Modifier)?
> 
> // Example for Mod
> 
> DEPARTMENT_ID   = addColumn("DEPARTMENT_ID",    DataType.AUTOINC,       0,
> Mod.AutoGenerated, "DEP_ID_SEQUENCE");
> 
> NAME            = addColumn("NAME",             DataType.TEXT,         80,
> Mod.NotNull);
> 
> HEAD            = addColumn("HEAD",             DataType.TEXT,         80,
> Mod.Nullable);
> 
> BUSINESS_UNIT   = addColumn("BUSINESS_UNIT",    DataType.TEXT,          4,
> Mod.NotNull, "ITTK");
> 
> UPDATE_TIMESTAMP= addColumn("UPDATE_TIMESTAMP", DataType.DATETIME,      0,
> Mod.AutoGenerated);
> 
>  
> 
> Any other ideas are also welcome.
> 
>  
> 
> BTW: Finding a good name for a class, function or variable is the most
> challenging part of programming (my phrase)
> 
>  
> 
> Rainer
> 
>  
> 
>  
> 
> 

Immer auf dem Laufenden! Sport, Auto, Reise, Politik und Promis. Von uns für Sie: der neue
Arcor.de-Newsletter!
Jetzt anmelden und einfach alles wissen: http://www.arcor.de/rd/footer.newsletter

Mime
View raw message