Forum: Building VoltDB Applications

Post: Booleans in VoltDB

Booleans in VoltDB
Jan 13, 2014
Hi, is there a particular way you'd recommend to model booleans in VoltDB?
Jan 13, 2014
Hi Paul,

Typically a TINYINT (1-byte signed integer) datatype is used, with the convention of 1 for true, 0 for false. While you need to compare it to a constant 1 or 0 in expressions, it has some benefits in allowing you to use math functions and operators for some things. If you want to get human-readable "true" and "false" values, you can use DECODE(my_column, 1, "true", "false").

Jan 14, 2014
Great, thanks for the info, Ben