Compositional Datalog on SQL: Relational Algebra of the Environment