Hacker News new | ask | show | jobs
by taffer 2460 days ago
The table is the relation. A join is just an operation that combines two relations to a superrelation.
1 comments

A join in an intersection in relational algebra
Oh, wow.

I've been in the industry for over 20 years. I even worked on SQL Server Analysis Services for 5 years (up to 256-dimensional 'cubes' in the early 2000s)... and I never thought of joins in this way. Granted, MDX was a beast in its own right.

Cue discussion about self-taught vs college educations. I've got advantages being self-driven learner... but I've definitely missed out in some regards.

MDX isn't a relational language, though. It's a dimensional language.

The best short description I can give about MDX is that it's the language your pedantic uncle would come up with after falling in love with Ralph Kimball, when all he knew to base it on was SQL.

But the core operations in MDX operate upon hierarchical dimensions and facts that can be aggregated.

    SELECT ... FROM ... WHERE
has no inherent relational semantic. It is simply a syntax that has been standardized upon for interacting with relational database systems. It was also, coincidentally, chosen as the syntax for another language, MDX.

Funny enough, the successor to SSAS Multidimensional is SSAS Tabular, where the query language is DAX. DAX was designed with an explicit goal of looking like Excel's formula language, but it is in fact a relational language which is semantically very similar to SQL, despite looking nothing like it.

Not necessarily, it can be a union too? Depends on the type of join.
A union is not a join at all - a union is a union. They're different concepts entirely.
Isn't a full outer join a Descartes product? And thus any other join is just a special case where rows get selected/projected/filtered out?
The Cross join is a Cartesian product. Good read: https://en.m.wikipedia.org/wiki/Join_(SQL)