Getting all courses and creating relationships between categories and courses added.