Figma interview question

How to better optimize their different SQL tables