Query data from database on startup