Student or Learner
Some textbooks teach relative clauses by presenting 2 sentences and saying that they can be combined by changing the common 'word'(?) into a relative pronoun.
(1) I saw a student.
(2) The student was eating an apple.
(3) I saw a student who was eating an apple.
What I am interested in is analysing the structure of the sentences.
In (1), the sentence structure is S V O. 'The student' is the object.
In (2), it is also S V O. 'The student' this time is the subject.
So what happens in (3)? Which is the subject?
I want to know all this because I'm trying to explain to someone when to use who and when to use whom, but it's confusing to figure out which is the subject and which is the object.