Row-by-row operations are the black sheep of SQL. Cursors are often abused by developers who struggle to grasp the set-based mindset of SQL and try to imitate the more familiar imperative programming paradigm in SQL. In this video, explore the various types of cursors and in what rare cases they might make sense to use in SQL.
- [Instructor] I said once or twice before, … that row processing order … doesn't pose any significant logical implications. … And that for our humble human brains, … it is more intuitive to think of it as if … it was a row by row operation. … That's why I explained the processing of joins, … where having and select all as if they were processed … row by row. … It was mostly for convenience sake. … There's no row order until the order by mutilates are set … and turns it into a cursor. … So any discussion of row order before that … isn't even relevant. … Until Dr. Codd invented the relational model, … data didn't exist. … Just kidding. … I'm trying to see if you're paying attention. … Until Dr. Codd invented the relational model. … Data was processed using a paradigm known as … sequential access methods, or uncle SAM for short. … Sequential access methods are widely used even today … in many programming languages. … Unfortunately, … many SQL developers are still stuck in this mindset. …
This course was created by Ami Levin. We are pleased to offer this training in our library.