Pregunta de entrevista de Figma

How to better optimize their different SQL tables