In relational databases (sql) tables are actually table representations of relations, where a relation is defined as any subset of a Cartesian product.
In the first sql example we have a “person” relation, which is a subset of namesXgenders cartesian product. Because of this an element of the person relation (“Jimothy”, null) cannot have “no gender” (as it wouldn’t be a member of the cartesian product namesXgenders).
All of this leads to the following: null in sql doesn’t mean “said element doesn’t have that property”, it means that said property is unknown.
With that in mind, the first example returns expected, if on the surface counterintuitive result: you don’t know what Jimothy 's gender is, so when queried with NOT M NOT F, that row shouldn’t be returned, because you can’t just assume Jinothy’s gender. The query should be, for those cases: not m, not f or unknown (ie is null).
Similarly for the second case. Email is not nonexistent, it’s unknown, so it makes sense that the db allows you to insert more than one person with unknown email addresses.
I wouldn’t say that either of these is an sql wtf, I would just call both of those tables badly designed.
In my first year of high school I had Latin, which I hated with a passion. Before, I thought that it would boil down to learning some common words and sayings and proverbs, but no. It was learning latin as a foreign language. I don’t think I was taught anything remotely as useless as that. And I really don’t like the teacher and she didn’t like me and it was truly awful and I hated every second of it. It was so awful that I had nightmares about it, even years after high school.
A couple (two I think) of years after that latin studies I saw the Life of Brian for the first time. I didn’t know what I was going to see, so when the “romanus eunt domus” scene came. It wasn’t just hilariously funny it was also cathartic.
So I’d say that. I remember that sketch almost by heart since the first time I saw it.