Implemented function that gets catalog data from the database.