Updated DB implementations

Tables now access eachother properly, through eachother's query
interfaces instead of directly.