separate out sql mapping
Merge pull request #27 from wongak/refactor_model

separate out sql mapping