use database to store