HQServer database schema defined not tested
Fixed db schema