How to difference a column name on the select statement which derive from diferent ancestor tables? I need the name of a doctor and the name of a patient, both derive in the same last child table which is Person, and both have ancestor a Register table, so something like:
         Patient
       /            \
Register
       \                   Person(idPerson, Name)
          Doctor     /

So on the select statment how do I differentiate the Name from Person that stems from Patient versus the one that stems from Doctor?
Query would be something like this, but does not work.:
SELECT
    Person.Name AS DOCTORNAME
,   Person.Name AS PATIENTNAME
FROM
    Register
    INNER JOIN
        Doctor
        ON Register.Doctor_idDoctor = Doctor.idDoctor
    INNER JOIN
        Person
        ON Doctor.Person_idPerson = Person.idPerson
    INNER JOIN
        Patient
        ON Register.Patient_idPatient = Patient.idPatient
    INNER JOIN
        Person
        ON Patient.Person_idPerson = Person.idPerson;

So how do I get the select to make this difference out?
Something along these lines. I need to link to the same table more than once so I need to give unambiguous table aliases. I favor minimal character aliases but you'll be needing to reference the doctor person, DP, or the patient person, PP.
SELECT
    DP.Name AS DOCTORNAME
,   PP.Name AS PATIENTNAME
FROM
    Register AS R
    INNER JOIN
        Doctor AS D
        ON R.Doctor_idDoctor = D.idDoctor
    INNER JOIN
        Person AS DP
        ON D.Person_idPerson = DP.idPerson
    INNER JOIN
        Patient AS P
        ON R.Patient_idPatient = P.idPatient
    INNER JOIN
        Person AS PP
        ON P.Person_idPerson = PP.idPerson;