Arth I-Soft interview question

Basic oops and database question