I’ve been experimenting, again with these. Apart from some bugs, the things are moving. I’ll try to summarise my findings and thoughts on this beast called relations.
throw everything into the water
Let’s start with a little bit of maths. It gives me that comfort feeling of being serious if I put down some formulas. I might be shooting myself in the head, which is not that comforting.
So, in our case, a relation is a n-tuple - R(X(1),..,X(n)), where Xi are some sets, possibly ordered, or partially ordered sets. The simplest useful relation would be the R(x) - a single value. The equivalent of an SQL databse table is R(Y(1),...,Y(n)), where Y(i) is a column in that table. The equivalent of a SELECT … WHERE query in this little math markup journey is F(R(Y(1),…,Y(n))), where F() is a filter function implementing the conditions in the where clause. Similarly a row in the db is R(y1,…,yn), where yi is the value for Y(i) in that row.
read more