Added basic relational API
Merge Aaron's