> MySQL have, but only as a synonym to TINYINT(1)

I didn't know that. So it's possible to store "2" into a boolean
column in MySQL?

> This is for mapping column names to types. Good idea. But does Oracle have
> type domains? One can create a domain MYBOOL, which is actually type
> TINYINT(1) to use it across huge database.

Oracle knows the concept of UDT (user defined types). They include
OBJECT, ARRAY, TABLE types as well as "type renames" or what you
describe as "type domains". I hadn't thought of the latter case,
though.

> In this case name mapping is
> ineffective, I think, because there can be like 100 different MYBOOL fields
> in database. This is where type name mapping is more effective, I think.

I'll first have to read into type domains for MySQL. Can you provide a
documentation link? Did you try how jOOQ behaves when you actually
have a MYBOOL column? Is that generated as a Field<Boolean>, or
Field<Byte>, or is there an error (which will generate Field<Object>)?

> Column name mapping is a good thing, if a database is designed in a way,
> where you can always tell column type from it's name. But I think this is
> not always the case, I think. More, may be this is almost never the case.

If you fully qualify the columns, then I think that's the best
solution, which is good for most users. E.g. a user wants to have
exactly 5 columns treated as BOOLEAN, instead of TINYINT(1), so they
can list exactly those 5 columns. The regular expressions provide more
flexibility in large schemata, where you don't want to list 500
boolean columns.

Reply via email to