DEV Community

Discussion on: Explain Declarative vs Imperative Programming like I'm 5

Collapse
 
khophi profile image
KhoPhi

If

SQL is declarative. You tell SQL your intention

Then ORMs are "Imperative"?

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard

Nope, ORM are just a convenience wrapper to make SQL easier to use in your programming language, but apart from them pretty much the same.

If you were to create your own logic on how to fetch efficiently all users living in Berlin, that would be imperative.