How to satisfy 2NF and what are superkeys? - Understanding the algorithm for database normalization in general
to satisfy 2NF, it is so that all data/columns need to depend on the
  whole/entire primary key


That's incorrect. A relation R is in second normal if every non-prime attribute of R is fully dependent on each candidate key of R. In the case of studentid -&gt; username and username -&gt; studentid both username and studentid are prime attributes (attributes that are included in a candidate key). So those dependencies are not a violation of 2NF and Student_subject does satisfy 2NF with respect to those dependencies. As already pointed out, Normal Forms apply to relations, not to FDs.