Accenture interview question

Oops concepts fully explained, more in database