insert and get all from database