Hi,

Well, Sunday came and went and I was all about the other projects.
I'll try to get a few words in here now however.

Data types.

I think the best way for me to handle the ranges is to put up a page
on the wiki that covers that, as it is needed anyway. For the most
part it is easy to get, just refer to the java documentation and I
will do that. I'll work on this later this afternoon, and put up the
address of the page here after I have it started.

Strict vs Lax -  The HSQLdb manual "By default specified precision and
scale for the column is simply ignored by the engine. Instead, the
values for the corresponding Java types are always used, which in the
case of DECIMAL is an unlimited precision and scale. If a size is
specified, it is stored in the database definition but is not
enforeced by default. Once you have created the database (before
adding data), you can add a database property value to enforce the
sizes:"

However - Base on the other hand defaults to TRUE for that property.
In fact if I am not mistaken you can not change it, except for the
session and then only if there has never been an insert of data. I'll
double check that. But I do know that it is strict by default.

OK - just tried it. Once data has been added to the database you can
not turn strict enforcement off.

The only real reason, IMO, to not have strict enforcement is when
moving data into a database from another source, and you need to get
it in - even if it is off - so that you can manipulate it to what you
need. In other words I would not make too much of it. But you can
judge that for yourself

A couple other thoughts. The whole question of using small ints, or
tiny ints is for the most part, IMO, not that important. In fact it
can cause more problem then it is worth for users. For the size of
database that an embedded file would be dealing with it saves you very
little. It is good to cover that for completeness sake, but in reality
very rarely is it worthwhile or needed in a desktop database.

What is important is understanding those precisions for doubles,reals
and the like. I will try and dig up some common mistakes I have seen
people make with that and pass them along. Mostly dealing with
rounding errors due to lack of precision.

The VARCHAR_IGNORECASE is also an interesting feature to cover with
the reader. And I'll explain why - it is a very good way to allow
users to update lookup tables - on the fly - it is very nice for
searches and comparisons using like. It stores the case, it just
ignores it for the comparisons.

Anyway - I'll stop now and let you know when I have the wiki page up.

On 9/27/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I want to thank everyone that contributed to this mailing list with their
> knowledge of database data types and their insights about either using the
> HSQL embedded engine or some other database system.
>
> I do agree that deciding on the hardware (like in stand-alone vs server
> options) and the most appropriate database system are fundamental in
> database design. I also think that this questions will be done by some
> kind of professional who is building a complex database and can freely
> move from one option to the other. In contrast, the tutorial Andrew is
> helping me to write will focus on an average user of OO who just
> discovered Base and is thinking that maybe he could develop a small
> application to keep track of clients, orders and payments for his own
> little business or professional practice.
>
> So I have decided that the user of this mid-level tutorial:
>
> 1.Has read about building tables, forms and queries in other Base
> tutorials BUT
> 2.Has no formal idea of what a database is or how it's structured
> 3.Has no information about the factors in deciding how to structure tables
> or the relations of data.
> 4.Has no notions about implementing the previous considerations with Base
> 5 AND still would like to invest the time to develop a small database with
> Base to handle information relevant to him/her.
>
> Additionally, and for the sake of defining the limits of the tutorial,
> Andrew has helped me decided that the average database user will need to
> develop and application that has only one formal user (role), and that
> this application will run as a stand-alone in his/her computer.
>
> All other parameters (content, scope, level of training, etc.) will be
> based on the considerations mentioned above.
>
> Andrew, thank you for the material you have sent to me. I am currently
> studying it. You said that multiple Base data types will map to common
> Java data types. I think that this means that there are more names than
> categories. I guess that the differences make sense when Base is being
> used as a front end for other database systems and users, but behave in an
> identical form when used with the HSQL engine. If this is correct, can you
> tell me which are the ones that can be considered
> identical/interchangeable?
>
> Can you also explain to me how does Base (or the user) chose among strict
> or lax modes of operation (in data type assignment)? And lastly, what are
> scalar values? How do you scale them? When do you use them?
>
> Thanks beforehand!
>
> Mariano
>
> Mariano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to