I think about the declarative nature of SQL. And I think of the declarative nature of OOP.
Programmers don’t like SQL because they want to program. They think in processes not declarations of processes defined by their result hiding all the machinery behind an abstraction.
SQL is a declarative language, where class definition is declarative but the program itself is imperative. Programmers hate SQL because it takes over programming from them. They can’t control the program the SQL engine writes.
When you write SQL the database decides how to to implement the query, and runs programs that do…