What are the prime and non-prime attributes in this relation? R(HIJKLMNO)

L -&gt; MNO
HI -&gt; JKLMNO
J -&gt; KL
K -&gt; H


HI is a key.

So, H is a prime attribute.

But, H is also in non-key part.

What are the prime and non-prime attributes in this relation?
Your schema has three (candidate) keys:

HI
IJ
IK


While it is immediate to discover tha HI is a candidate key since it determines all the other attributes, you can see that this is true also for IJ and IK by calculating the closure of those attributes:

IJ+ = IJ
IJ+ = IJKL     (by adding the right part of J → KL)
IJ+ = IJKLH    (by adding the rigth part of K → H)
IJ+ = IJKLHMNO (by adding the right part of L → MNO)


analogously for IK:

IK+ = IK
IK+ = IKH      (by adding the rigth part of K → H)
IK+ = IKHJLMNO (by adding the right part of HI → JKLMNO)


For this reason, the prime attributes of the relation are:

HIJK


while the non prime attributes are:

LMNO


Note that there are no other candidate keys since M, N and O appear only on the right side of functional dependencies, so that they cannot “contribute” to any key. L appears both on a left part and on a right part of functional dependencies, but it is determined by HI, IJ and IK, and does not determine any of these attributes, so it cannot be part of a key. Finally, you cannot remove any attribute from HI, IJ and IK without losing the key property.