title: what is difference between creating another table and using arrays in postgres
body: <p>In my university, I was given a task to create a simple university database with some tables like student, departments and etc. There was an interesting moment when I did relations between students and classes, one student may choose multiple classes, I was taught to create the third table with two FKs, and it should look like this Adam(id - 1) takes math course(id - 5) and in the third table, the record would be (1, 5), and here is a question why should we prefer third table instead of Arrays, for me it looks much easier to hold student's classes as an additional column in the student table. Here is an example, imagine student table <code>(id, name, age, arrayOfClassesID) (1, Adam, 20, [1,8,9,6,7])</code>.</p>
  
  <p>P.S. This is not my homework, I have already done it, but it is really interesting for me </p>