Get data from database