On-demand ORM for SQL database