Hi Aurélien

2013/8/16 Aurélien Manteaux <[email protected]>

> Hi Lukas,
>
> https://github.com/jOOQ/jOOQ/issues/2352 is exactly what I am looking
> for, thanks !
>
> I wrote tinyint(1), but yes I meant tinyint only !
>
> For the char(1), what is the difference with tinyint ? They both are
> stored in on byte.
>

I'm by no means a MySQL expert, so I don't know which data type is your
best choice from a storage perspective. This link here will give you some
heads-up, mentioning the BIT(1) data type:
http://stackoverflow.com/a/289759/521799

In Oracle, people usually use NUMBER(1) or more rarely CHAR(1) because
these two data types formally maintain their length in ALL_COLUMNS and
other dictionary views. It is thus "easier" to formally recognise the
intent of this column being a boolean. That's not necessarily the case with
tinyint / tinyint(1), where (1) is not part of any formal metadata. On the
other hand, it probably doesn't really matter to a real-world application.
It just matters to a library like jOOQ, which would need to find a most
generally applicable solution, which is to leave the choice up to users how
they map data types.

Best Regards,
Lukas

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to