NCDEX interview question

Oop and database