Retrieve data from database.