Major integration for relations and queries