2009/7/10 Drew Jensen:
>> I should add that Base does not have a native enum command, yet Calc
>> does! This is a widely used feature in almost everything that I do.
>>
>>
>
> Hello Dotan,
>
> Let me take a moment to discuss that statement.
>
> But first:
>
> I hope that this email finds you in good spirits today and I hope that you
> are still in good spirits when you are done reading it. My intention is NOT
> to say - You should have used Base or should not have used Calc. I take it
> you created (or helped create) this spreadsheet for a client (or friend) and
> they limited your choice of tool - in the end it is always the clients
> choice. ( although one is not bound to take a contract IF the customer is
> being unreasonable...yeah, like that actually works)
>
> In fact I would offer this: Most often when you find yourself asking the
> question "Database vs Spreadsheet" for a project, then the best solution is
> to use both.
>
> This email will only look at Calc's Validity function and specifically the
> use of a 'list' and how that compares with what is available in Base.
>
> To start let me just hit a couple of points about what a ENUM data type is:
> - It is an enumerated list
> - It is an ordered list
> - It is, normally, implemented in such a way as to optimize both storage
> size and comparative performance.
> - When applied to a table column then that column may hold exactly 1 (or 0
> if you support NULLS) item from the enumerated list.
>
> I'll just look at one point there - It is an ordered list.
>
> A common reason for using an ENUM is when a very specific sort order is
> desired, one that can not be represented by sorting using a natural sort
> (say by Alphanumeric value).
>
> Just a quick example here.
> Say I have a ENUM type with the following items:
> Aaron; Bob, Carol, Erin
>
> Sorting the table on the column declared with that ENUM type would order the
> output as if based on the Textual representation of the items -or in other
> words- exactly in the order used in creating the list.
>
> If I declared my ENUM type as:
> Erin, Bob, Aaron, Carol
>
> Now if I sort the table based on this column it will sort - in exactly the
> same order as I entered the items in the enumerated list - again.
>
> That difference and why you might want it may become clearer if I declared
> an  ENUM with this list:
> Low; Medium; High
>
>
> So - in Calc one can create a list of strings to check data entry against
> but it is just that, a list of strings. Use the last list (Low, Medium,
> High) and sort your block of cells...well, I'm sure you can see the
> difference in results.
>
> Alright, well right about now you might be saying - So what, Base doesn't
> have am ENUM type anyway.
>
> I'll try to explain why that statement is not completely accurate and look
> at what features exist in the Bases form design functions that lets one do
> what you do in Calc with Validity lists.
>
> ----sorry I need to break for a moment, work...drat-----
>
> BRB,
>
> Drew
>
>

Hi Drew, I did not see this message when you sent it as my email
client (web-based Gmail) broke the thread.

My usage of enum is to separate unlike items. One example from a
current project is to organize incoming messages. Some are personal
notes, and they are destined for the personal notes bin. Some are
things that need to be done, some are things that need to be bought.
In no case will there be overlap, however having a single interface to
record them in is very helpful. Therefore, the use of enum.

While I understand that in many cases the lack of enum can be cleverly
worked around by creating a clever UI, I simply do not want to go
through all that trouble. It also makes maintenance a pain, which is a
primary concern for me.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to