2 ms·
Loosely speaking, this is how I program in SQL. Each table is plane floating in a multidimensional space, each relation get pinned from one plane to another, jo
by sitkack 12y ago
Loosely speaking, this is how I program in SQL. Each table is plane floating in a multidimensional space, each relation get pinned from one plane to another, joins are spikey balls, sub queries are recursive non-euclidean spaces, etc. Although I'd say the SQL is more readable than J but the mental visualization you describe is nearly identical.
- mickeyp 12y agoI agree. "Grokking SQL" (or rather the relational and set concepts behind it) makes it possible to mentally map how you want the query to behave. Although SQL is way, way more verbose than J/APL it is still extremely readable, even if the query is massive. Untrained SQL users always point to big queries as some sort of code smell when in fact most queries are logically partitioned by virtue of how they work.
- sitkack 12y agoI replaced a 5k line system with a 140 line SQL query. So massive SQL can have pretty significant multiplier in main code reduction.