this post was submitted on 26 Oct 2023
285 points (96.4% liked)

SQL - any and all

306 readers
1 users here now

For discussion about SQL and databases. All versions welcome.

founded 1 year ago
MODERATORS
285
submitted 1 year ago* (last edited 1 year ago) by DeadNinja to c/sql
 

Jesus died at 33, so that can't get returned in the query response lol

you are viewing a single comment's thread
view the rest of the comments
[–] Whelks_chance 16 points 1 year ago (1 children)

Realistically you wouldn't store age, you'd store birthdate or possibly a datetime value, and calculate it from there

[–] hansl 6 points 1 year ago

First Normal Form users unite!

By the by, as someone who have used both NoSQL and SQL extensively (once in the same project), the trick of NoSQL is that you shouldn’t use FNF and compute that at write time. The idea is that it’s faster to MapReduce pre calculated values since that’s the operation you want to optimize in a NoSQL world. A lot of people get that wrong and just replace MySQL with Mongo without rethinking usage and schemas.

But even in a NoSQL context I’d rather use a Postgres jsonb column over MongoDB.