Combining semantics and relational database theory