DB insert and fetch method