Remix.run Logo
crazygringo 8 hours ago

> The way to do it without using a nullable column

I mean, you could, but having separate tables for every optional field would be an organizational and usability nightmare. Queries would be longer and slower for no good reason. Not to mention a gigantic waste of space with all those repeated primary keys and their indexes.

And you could have databases that prohibited NULL values, but we mostly don't, because they're so useful.

naasking 2 hours ago | parent [-]

> but having separate tables for every optional field would be an organizational and usability nightmare

I think this indicates that declaring and managing state is too onerous in SQL.