use database for recording