adding some basic api

not really liking this ORM though, it doesn't do any foreign key enforcement so you can easily get corrupt data.