Added insert code to insert table to db, and fixed bugs when passing domain data in domain repository
Fixed sqlite database issues