Figma Interview Question

How to better optimize their different SQL tables