Core code for data base access using Mybatis