Scala

Leave a comment

Installation in Windows:Installation of scala in very easy. Please follow below stepsStep 1: Download scala-2.11.7.msi from below path http://www.scala-lang.org/download/Step 2: Double click on the downloaded msi file and, click on next till installation get finished Step 3: Once your installation is finished, scala is in below path by default C:Program Files (x86)scala Step 4: Open environment variables through ‘View Advanced System Settings’ and give the path where scala is installed.

Learn More

Aggregation – Part 14

Leave a comment

Aggregations are special types of operations that essentially process several data records and return only the computed results. Now essentially, they’re a method to give you just the results from the operation. That can be contrasted with the find or read operations we looked at in previous videos, which bring back a whole set of records, aggregations only bring you back the aggregate results. Now this has a lot of advantages. It can certainly simplify the application code, and it can limit

Learn More

Using the find() method- Part 13

Leave a comment

We’ve already seen how to do some basic find() operations. Let’s look at some other items here we might want to do in order to adjust what we get back. We want to change things a little bit. For example, let’s say I would like to sort my responses, db.products.find(). Now within that find(), I can put any criteria I like, but since we only have few documents, I’m going to get back all of them. However, I’m going to type in sort, open parentheses, and I can sort on any value in there I like. I’m

Learn More

Cursor usage in MongoDB- Part 12

Leave a comment

What is a cursor? Well in database terminology, a curser is basically a pointer to your data, and it can be moved forward or backwards. Basically it’s a way of looking at your data using a specific variable to point to a location within your data. Well let’s create one. We create a variable; which will just going to call acursor. We are going to set it equal to the response of a find() operation. var acursor = db.products.find() — To create cursor acursor.count()Now try acursor.explain(). It’s

Learn More

MongoDB data retrieval – Part 11

Leave a comment

Obviously, once you’ve entered documents into MongoDB, and you’ve updated and deleted, at some point you’ll need to retrieve. And we’ve already seen this very simple, db.products.find() statement, that returns all of the documents currently in our Mongo database, and that’s perfectly fine when we have so few documents, but what happens if instead of five, we have 50 or 500 or 50,000? Not only is returning them all impractical due to the fact that it’s computationally intensive and uses up

Learn More