use database to manage download progress