TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What the Heck is a Relation? From Tables to Cartesian Products to Logic

50 pointsby ludsanover 11 years ago

5 comments

csenseover 11 years ago
In mathematics, a relation is a set of ordered pairs.<p>Strictly speaking, the relations of database theory are different objects, but closely related. (Yes, I just made an awesome pun.)<p>I&#x27;m surprised that the author didn&#x27;t include &quot;a relation is a set of tuples&quot; as a definition in the article. Also, absolutely nothing is said about viewing a relation as a graph.
cousin_itover 11 years ago
I suspect that using unordered sets as the foundation for databases might have been a mistake, and ordered lists with allowed repetition would&#x27;ve made a better model, if only because they can model tables and query results equally well (ORDER BY, SELECT without DISTINCT). Is there a good reason why this road was not taken?
评论 #6965754 未加载
评论 #6965746 未加载
tunesmithover 11 years ago
The followup article (<a href="http://merrigrove.blogspot.com/2013/12/the-occultation-of-relations-and-logic_22.html?m=1" rel="nofollow">http:&#x2F;&#x2F;merrigrove.blogspot.com&#x2F;2013&#x2F;12&#x2F;the-occultation-of-re...</a>) is really good, too. I particularly liked the concrete example of the &quot;projection&quot;.
k0n2adover 11 years ago
&quot;The self is a relation that relates itself to itself or is the relation&#x27;s relating itself to itself in the relation; the self is not the relation but is the relation&#x27;s relating itself to itself.&quot; - Kierkgaard<p>Sorry, had to chime in with that
chris_wotover 11 years ago
You have the following material implications:<p><pre><code> EMPLOYEE(Daniel Smith, Marketing) → TRUE EMPLOYEE(Jebediah Vargas, Marketing) → FALSE </code></pre> However, if the employee name in the function is not Daniel Smith but the employee is in marketing, the first predicate is true. How does that fit into relational databases?<p>P.S. Great article!
评论 #6965500 未加载