In this video, we discuss:
Defining a DB connector
Updating the database
Creating a data access object (DAO) to extract common data access patterns
We suggest using Thrift to define a contract of the service and classes that are going to be exposed, and then auto-generating the code, rather than writing it all from scratch.
By creating a DAO, you can separate out common data access patterns and have different controllers access those tables to perform different queries on the same data.