I've added attr_type columns to the hosts and services, with the result that the related tables look like this: sqlite> select * from expanded_service_attrs where host = 'tirapasta'; service attr attr_type host value ---------- ---------- ---------- ---------- ------------------------------------------- nextcloud check function tirapasta cZ5FZ5FmainZ5FZ5FZ0AcheckZ5FhttpZ0Ap0Z0AZ2E nextcloud enabled bool tirapasta 0 nextcloud keyword str tirapasta Login nextcloud secure bool tirapasta 1 nextcloud ssl bool tirapasta 1 nextcloud uri str tirapasta / nextcloud virtualhos NoneType tirapasta ping check function tirapasta cZ5FZ5FmainZ5FZ5FZ0AcheckZ5FpingZ0Ap0Z0AZ2E ping count int tirapasta 3 ping enabled bool tirapasta 1 ping timeout float tirapasta 3.5 wordpress check function tirapasta cZ5FZ5FmainZ5FZ5FZ0AcheckZ5FhttpZ0Ap0Z0AZ2E wordpress enabled bool tirapasta 1 wordpress keyword str tirapasta Gardening wordpress secure bool tirapasta 1 wordpress ssl bool tirapasta 1 wordpress uri str tirapasta / wordpress virtualhos str tirapasta dione.no-ip.org sqlite> (i.e. a mix of strings, numbers and encoded functions). But I've still not added attributes to the check results, with the result that they're all z-encoded, which they don't need to be: sqlite> select * from service_checks; service_check_id timestamp service host ---------------- ---------- ---------- ---------- 1 1519580302 nextcloud fettuce 2 1519580303 ping fettuce 3 1519580305 ping google 4 1519580307 ping tirapasta 5 1519580310 wordpress tirapasta sqlite> sqlite> select * from service_check_attrs; service_check_id service_check_attr value ---------------- ------------------ ---------- 1 found I00Z0AZ2E 2 loss F0Z2E0Z0AZ 2 time F0Z2E381Z0 3 loss F0Z2E0Z0AZ 3 time F21Z2E707Z 4 loss F0Z2E0Z0AZ 4 time F0Z2E414Z0 5 found I00Z0AZ2E sqlite> I should: * abstract the desqlify code into a new function * add attribute declaration functions for check results; let's start of with doing it on the fly and not predeclaring the types, even though this will make things slower.