4 ms·
It's probably nice if you only write JS (say, you write a node.js app). To me SQL is still the best query language we have. It's usable amongst a wide range of
by buster 12y ago
It's probably nice if you only write JS (say, you write a node.js app).
To me SQL is still the best query language we have. It's usable amongst a wide range of database servers, from tiny embedded sqlite to oracle. It's _easy_.
One side that NoSQL fails on is to not have a common query language, imo. You chose MongoDB in your project and want to migrate to another database? Not that easy. Switch from MySQL to Postgres? Probably not a drop-in replacement, but much easier to do.
- brickcap 12y ago>To me SQL is still the best query language we have I agree 100% there. I think orient db proves that it is possible to use sql in a no sql database. Though I think not all databases are designed to support entire sql querying mechanism.
- twic 12y ago> To me SQL is still the best query language we have. OQL! Okay, so nobody ever implemented OQL. But there are OQL-inspired query languages in production which i prefer to SQL for routine use, such as JPQL. One reason for that preference is the ability to join through foreign keys with a syntax which resembles property access on objects: select e from Employee e where e.department.head.manager.level = 'VP' This beats the equivalent SQL: select e.* from Employee e join Department d using (department_id) join Employee h on d.head_id = h.employee_id join Employee m on h.manager_id = m.employee_id where m.level = 'VP' Admittedly, whilst JQPL is nice for this sort of routine fetch-and-filter stuff, it lacks the more powerful features of SQL like window functions, recursive common table expressions, etc. I don't often need those, but when i do, it would be rather painful to do without them.