Skip to content

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

Comments

You have the following material implications:

    EMPLOYEE(Daniel Smith, Marketing)  →  TRUE
    EMPLOYEE(Jebediah Vargas, Marketing)  →  FALSE
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.S. Great article!

The arrow notation here is not material implication, but function evaluation. The function itself can be interpreted as an Indicator Function[1] for the employee set, or alternatively, as simply evaluating the predicate.

In terms of tables, the rows are exactly the subset of predicates that are TRUE. So FALSE statements like the second one are indicated by their absence in the employee table.

[1] http://en.wikipedia.org/wiki/Indicator_function

Thanks! I had no idea

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.