In our application we use a UUID (128 bits) to identify objects. Many of our columns are simply storing these UUIDs.
At the moment our only alternative seems to be to cast these 16 byte binary strings as character strings, increasing the size to 36 bytes (or 32 bytes if we remove the '-' separators). This has obvious drawbacks in terms of size and will often mean the difference between being able to read the column into memory or not with the obvious peformance degradation.
Ideally we would like to define a column type of VARBINARY(16) (using a MySQL datatype example, actual datatype names vary across database technologies, Oracle=RAW or VARBINARY, Postgres=BIT or BYTEA, etc.). Operations on such a column would treat the content simply as a sequence of bits, not interpreting them as characters, integers, etc.
Has anyone attempted something like this with MonetDB, or are we missing some obvious solution?
Thanks very much.