Re:Zero One Infinity Rule
by grensley on Saturday March 18, 2023 @04:27PM
(#35212796)
Two is quite relevant for relationships
[ Parent
| on HN ]
Well, if you ignore polyamory and polygamy...
You can have n-ary relationships. Relational databases are built on that.
What are the columns in a relational table like that?
Not sure what you mean. A table with N columns corresponds to an N-ary relation. The rows contained in the table are the tuples contained in the relation. Table = relation. That's why it's called a relational database.
See also this example in Wikipedia of a ternary relation: https://en.wikipedia.org/wiki/Finitary_relation#Example
Another example: If you have a table (SSN, Name, DateOfBirth), then that corresponds to the relation "person with SSN x has name y and date of birth z". In that case it's a relation between SSNs, names, and dates.