MongoDB is a typical representative of NoSQL databases, which supports document structured storage methods for more convenient data storage and use, and has high data access efficiency. However, its computing power is weak, and in practical use, MongoDB’s calculations, especially complex calculations, can be very troublesome. This requires a data processing engine with strong computing power to work with it.
SPL, an open-source data processor, is a professional structured data computing engine with rich computing libraries and complete, database independent computing capabilities. SPL provides an independent process calculation syntax, particularly adept at complex calculations, which can enhance MongoDB’s computing power and complete tasks such as group summarization, correlation calculations, and subqueries without any problem.
Regular query
MongoDB’s difficult to handle connection JOIN operations can be easily solved with SPL:
Single table participates in calculations multiple times, reusing calculation results:
IN calculation:
Objectification of foreign keys, foreign key pointers are not only convenient but also efficient:
Simple implementation of APPLY algorithm:
Set operation, merge intersection:
Search for member numbers in the sequence:
Intersection of multi member sets:
Complex calculations
TOPN operation:
Aggregation of nested structures:
Merge multiple subordinate documents:
Query of nested List subdocuments:
Cross summary:
Segmented grouping:
Classification and grouping:
Data writing
Export to CSV:
Update database (MongoDB to MySQL):
Update database (MySQL to MongoDB):
Hybrid computing
It is also easy to achieve mixed computing between MongoDB and other data sources with SPL:
SQL support
In addition to native syntax, SPL also provides SQL support equivalent to the SQL92 standard, which can be used to query MongoDB using SQL, such as the correlation calculation mentioned earlier:
Application Integration
Moreover, SPL provides standard application programming interfaces such as JDBC/ODBC, making integrated calling very convenient. The use of JDBC:
…
Class.forName("com.esproc.jdbc.InternalDriver");
Connection conn = DriverManager.getConnection("jdbc:esproc:local://");
PrepareStatement st=con.prepareStatement("call splScript(?)"); // splScript为spl脚本文件名
st.setObject(1,"California");
st.execute();
ResultSet rs = st.getResultSet();
…
With these features, enhancing MongoDB’s computing power is not just talk. Do you want to download and give it a try?