Preliminary implementation of ORM. Add schema for each table.

The ORM implementation borrows a lot from Sequel. Still need to
specify the license.