Populates rows from database.