I have two data sets and I would like to measure correlation between variables.

In the first data set I have three classes: c1, c2, c3. My classes are representing the difficulty level of an exam and I converted them into numbers such as 1 (easiest), 2 midlle, and 3 (hardest).

The second data set, I have nominal classes are types of exams that are not necessarily easier or harder (I can assume that but I am not sure about it). I used a similar encoding as above but I am not sure if I am biasing the data this way.

My question is what type of correlation can I use in both cases with the exam results of students? I've seen some answers on the web but I was confused. I tried Pearson correlation in both cases and I got some results that confirmed my initial hypothesis but I am not sure if this is just an illusion.

Thanks very much for your help as I have limited experience with stats.