Download data from database