Heartrate database writing