XYZ interview question

How does inheritance affect the interaction with db