Add write to db function, also DBHelper class to support db
Add comment to DBHelper class.