Save and load favorite items from the database