Is there something like stored procedures in a NOSQL database?

I am new to the NOSQL world and still comparing nosql and sql databases,
I just tried to make some samples using mongodb.

I ask for stored procedures when we send several parameters to one stored procedure, and this procedure executes the number of other stored procedures in the database, will receive data from stored procedures and send data to other users.

In other words, the logic will occur on the database side using a sequence of functions and stored procedures.

Is this behavior or something similar already exists in the NOSQL database, or is it completely different, and I think not?

+3
source share
2 answers

Mongo uses saved Javascript in several places, including Map / Reduce, db.eval, and where clauses. Checkout this blog post for a survey:

Working with saved JavaScript in MongoDB

The key to storing your functions on the server and their availability in these three contexts is db.system.js.save:

db.system.js.save( { _id : "foo" , value : function( x , y ){ return x + y; } } );

More details in Mongo docs

+4
source

Depends on whether you specify NOSQL as No SQL or Not Only SQL.

OpenLink Virtuoso [1] ( ) , SPARQL-in-SQL SQL-in-SPARQL ; (Perl, PHP, Python, Ruby, JSP .), ..

NoSQL , Mongo JavaScript, .

[1] http://virtuoso.openlinksw.com/

0

Source: https://habr.com/ru/post/1741156/


All Articles