Hi, I have a table in Oracle DB,say, Student table. StudentID is the primary key in the table.I have another column interested subjects,say columns name is interested_SUB. A student can have more than one interested subject. In this case, I have the following 2 options:
1) Having the StudentID and Interested_SUB columns as the composite primary key. In this case, For example, If student interested in 3 subjects then I will have 3 rows in the table with (S1,SUB1) (S1,SUB2) and (S1,SUB3) as the column values and all other columns will have same values for these three rows.
2) Have a seperate table with columns StudentId and Interested_SUB and an additional column in first table to indicate whether student is interested in more than one subject. In this case, I will one row for each student in the student table with studentId and SUB as (S1,SUB1) and also the new indicator column as "Y". In the second table (S1,SUB2) & (S1,SUB3).
Please suggest me which of the above options is increasing performance of the DB.
Thanks in Advance