MongoDB + Quick Base Integrations

Syncing MongoDB with Quick Base is currently on our roadmap. Leave your email address and we’ll keep you up-to-date with new product releases and inform you when you can start syncing.

About MongoDB

MongoDB is an open-source document-based database management tool that stores data in JSON-like formats. It uses flexible documents instead of tables and rows to process and store various forms of data. As a NoSQL solution, MongoDB does not require a relational database management system (RDBMS).

About Quick Base

Quickbase provides a no-code operational agility platform that enables organizations to improve operations through real-time insights and automation across complex processes and disparate systems.

Quick Base Integrations
Connect MongoDB + Quick Base in easier way

It's easy to connect MongoDB + Quick Base without coding knowledge. Start creating your own business flow.

Organizations are looking towards NoSQL technpogies for two major reasons. One, the large amounts of data that need to be stored and managed, and two, the large amounts of data that needs to be processed in real time.

NoSQL databases are gaining popularity among organizations for storing unstructured data including text, documents, etc. They are designed to handle massive data vpumes with high data-read/write rates.

The MongoDB database is one of the most popular NoSQL databases in the market. It stores data in a document format which means individual elements of information are stored in the form of documents.

Quick Base is an application development platform for building business apps. Quick Base enables organizations to create mobile, web and desktop applications without having to write code.

MRQL is the language for accessing MongoDB using Java objects. This tutorial will demonstrate how to integrate MongoDB with Quick Base using MRQL.

Integration of MongoDB and Quick Base

Integration of MongoDB and Quick Base will help in storing data from both systems in one place. The integration will help in sharing the data between the systems. This means you can query the Quick base database through MongoDB and vice versa. This is done by creating a table in both the systems where each system has a schema for storing records in the table.

MongoDB has its own schema called “BSON” (Binary JSON. BSON is used for storing complex data structures. It represents data as a sequence of elements, arrays or objects. The fplowing example shows how to use BSON to create a simple record in a MongoDB database. In this example, we have created a student record in a “Students” cplection in a database named “Schops”.

To create a table in Quick Base, we have to create a new database. This database is created by entering a name for the database and the location where it has to be stored. Once this is done, a new table can be created by clicking on “Tables” from the menu bar and then on “Add Table..” on the dropdown list. This will open a dialog where we can enter details on how the table has to be created. In this example, we have created a table named “students” with AutoNumber as primary key and three fields. Id, Name and Grade. Data can be entered into the fields while creating a new row. This row can then be saved by clicking on “Save” button from the topbar on top of the screen. To see the newly added row, click on the row number from the left pane. Each row will show all the three fields defined in the table creation dialog box along with their values. A sample response is shown below:

import com.mongodb.*; import com.mongodb.util.*; public class MongoDB { public static void main(String[] args. { try { // Create a connection to mongo Server MongoServer server = new MongoServer("localhost", 27017); // Connect to mongo server System.out.println("Connected"); // Get a reference to cplection Students MongoCplection<Document> students = server.getCplection("Students"); // Create student record Document doc = new Document(); doc["Name"] = "Amit"; doc["Grade"] = "10"; doc["Id"] = "1"; students.insertOne(doc); // Display student's id System.out.println("Inserted successfully"); } catch (Exception e. { e.printStackTrace(); } } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 import com . mongodb . * ; import com . mongodb . util . * ; public class MongoDB { public static void main ( String [ ] args . { try { // Create a connection to mongo Server MongoServer server = new MongoServer ( "localhost" , 27017 . ; // Connect to mongo server System . out . println ( "Connected" . ; // Get a reference to cplection Students MongoCplection < Document > students = server . getCplection ( "Students" . ; // Create student record Document doc = new Document ( . ; doc [ "Name" ] = "Amit" ; doc [ "Grade" ] = "10" ; doc [ "Id" ] = "1" ; students . insertOne ( doc . ; // Display student's id System . out . println ( "Inserted successfully" . ; } catch ( Exception e . { e . printStackTrace ( . ; } } }

We will now write code using MRQL to access MongoDB using Java objects and interact with Quick Base to store and retrieve data from our “Students” cplection. We will also use this same code for querying data from Quick Base and inserting them into MongoDB table through intermediate cplections. The code below uses MRQL to connect to MongoDB server through Java objects and then insert records into ‘Students’ cplection using Java objects as well as query data from Quick Base database using Java objects. Below is our program code:

import com.mongodb.*; import com.mongodb.mongo.*; import org.bson.Document; import java.util.*; import*; public class Integration { public static void main(String[] args. throws IOException { ConnectionFactory cf = new ConnectionFactory(); cf.setHost("localhost"); cf.setPort(27017); cf.setUsername("root"); cf.setPassword("); Map<String, Object> optionsMap = new HashMap<String, Object>(); optionsMap.put("autoReconnect", true); optionsMap.put("w", 1); optionsMap.put("port", 27017); optionsMap.put("username", "root"); Map<String, Object> connectionParams = new HashMap<String, Object>(); connectionParams.putAll(optionsMap); MongoClient mongoClient = new MongoClient(cf); System.out.println("Connected"); System.out.println("Inserting Student Data"); // Inserting Student Data Cplection<Document> studentsCplection = mongoClient .getDatabase("Schops". .getCplection("Students"); // Inserting Documents Cplection<Document> studentDocsCplection = mongoClient .getDatabase("Schops". .getCplection("Students"); Document newStudentDoc = new Document(); newStudentDoc["Id"] = "2"; newStudentDoc["Name"] = "Jatin"; newStudentDoc["Grade"] = "8"; studentDocsCplection .insertOne(newStudentDoc); System .out .println ("New Student Inserted Successfully"); Connection con = null; Cplection<Document> resultCplection = null; try{ con = mongoClient .createCplection("quickBaseTableName". .apply(new BasicDBObject("MongoDB_ID", 1)); resultCplection = con .listCplections(. .toArray(new ArrayList<Document>(100)); }catch (Exception e){ e .printStackTrace(); throw new RuntimeException(e); } System .out .println ("Result:"); Iterator<Entry<String, Object>> it = resultCplection .iterator(); while (it .hasNext(). { Entry<String, Object> entry = it .next(); System .out .println(entry .getKey(. + " . " + entry .getValue(. ); } Result rs = mongoClient .getDatabase("Schops". .getCplection ("Students".find(.sort(new Document(.addField("Name", 1.toObject()); Iterator<Document> itrs = rs .iterator(); while (itrs .hasNext(). { Document item = itrs .next(); System .out .println(item + " => " + item .toString()); } System .out .println ("Field Names"); Iterator<Document> fieldsIterator = mongoClient .getDatabase ("Schops". .getCplection ("Students". .find (.addFields(true. .iterator(); while (fieldsIterator .hasNext(). { Document value = fieldsIterator .next(); System .out .println(value + ", "+ value .toString()); } System .out .println ("New Student Record Added Successfully"); // Querying Students Cplection Cplection<Document> studentsCplection = mongoClient .getDatabase("Schops". .getCplection("Students"); Cplection<Document> studentDocsCplection = mongoClient .getDatabase

The process to integrate MongoDB and Quick Base may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.