I wonder if anyone realizes that selects and joins in every database are implemented literally with for loops written in c.
The reason people use a relational database is because it has loops that are faster, safer, and more efficient than anything you can write.