|
|
|
|
|
by dragontamer
1761 days ago
|
|
To be fair, relational algebra is hard. That being said: going back to 1970 to read the original "A Relational Model of Data for Large Shared Data Banks" by Codd (the paper which started the relational-database + normalization model) is incredibly useful. But yeah, all of this debate about "how data should be modeled" was the same in 1970 as it is today. ----- SQL doesn't quite fit 100% into the relational model, but its certainly inspired by Codd's relational model and designed to work with the principles from that paper. And strangely enough, legions of authors and teachers and courses do a worse job at explaining relational databases than Codd's original 11 page paper. |
|
Relational algebra is a lot easier once you start viewing it as relational algebra - a declarative expression of intent that can be manipulated and re-expressed similar to other purely mathematical statements. Then, when performance tuning becomes the watchword, you take that flexible expression and slice and dice it according to how the DBMS you're working with requires to align it with performance. You always want to think of your queries as complex summoning spells that draw in different necessary resources in some particular patterns and then impose an expression form on that blob of data - then you'll skate through all things SQL.