Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mongodb access through sql like syntax

Tags:

mongodb

Is there any library where i can access mongodb by using sql like syntax.

Example

use db
select * from table1
insert into table1 values (a,b,c)
delete from table
select a,b,count(*) from table1 group by a,b
select a.field1,b.field2 from a,b where a.id=b.id

Thanks Raman

like image 706
Raman Narayanan Avatar asked Apr 10 '12 11:04

Raman Narayanan


1 Answers

The learning curve is small only if you are only doing extremely simple sql queries. If the extent of your SQL querying is "select * from X", then MongoDB looks like a brilliant idea to cut through all the too-complicated SQL. But if you need to perform left outer joins, test for null, check for ranges, subselects, grouping and summation, then you will soon end up with a round concave dent in your desk after being moved to Mongo. The sick punchline is that half the time, the thing you are trying to do can't be done in the Mongo interface. Mongo represents a bold new world where instead of databases doing things like aggregation and query optimization, it just stores data and all the magic is done by retrieving everything, slowly, storing it in app memory, and doing all that stuff in code instead.

like image 95
user2196670 Avatar answered Sep 30 '22 15:09

user2196670