relations constraints; knowledge query framework