Extend common BinDataType class and ensure DB conversion is idempotent