Implement select

(#17 precedes this PR)

Implement select. Begin implementing nested dbs