Implement entity operations on sqlite database