EzDevInfo.com

nosql interview questions

Top nosql frequently asked interview questions

Explanation of JSONB introduced by PostgreSQL

PostgreSQL just introduced JSONB and it's already trending on hacker news. It would be great if someone could explain how it's different from Hstore and JSON previously present in PostgreSQL. What are it's advantages and limitations and when should someone consider using it?


Source: (StackOverflow)

When to Redis? When to MongoDB?

What I want is not a comparison between Redis and MongoDB. I know they are different; the performance and the API is totally different.

Redis is very fast, but the API is very 'atomic'. MongoDB will eat more resources, but the API is very very easy to use, and I am very happy with it.

They're both awesome, and I want to use Redis in deployment as much as I can, but it is hard to code. I want to use MongoDB in development as much as I can, but it needs an expensive machine.

So what do you think about the use of both of them? When to pick Redis? When to pick MongoDB?


Source: (StackOverflow)

Advertisements

Is there any NoSQL database as simple as SQLite?

Is there any NoSQL database as simple as SQLite? I'm looking for a lightweight database to persist a small set of data for a simple desktop application. I still can use SQLite but prefer a more OO approach since my app doesn't handle much data.


Source: (StackOverflow)

Amazon SimpleDB vs Amazon DynamoDB

I have some basic understanding what Amazon SimpleDB is, but according to the Amazon DynamoDB description it seems to be almost the same: a NoSQL Key-value store service.

Can someone simply explain the main differences between them and tell in which cases to choose one over the other.


Source: (StackOverflow)

Update MongoDB field using value of another field

In MongoDB, is it possible to update the value of a field using the value from another field? The equivalent SQL would be something like:

UPDATE Person SET Name = FirstName + ' ' + LastName

And the MongoDB pseudo-code would be:

db.person.update( {}, { $set : { name : firstName + ' ' + lastName } );

Source: (StackOverflow)

How to run MongoDB as Windows service?

How to setup MongoDB so it can run as Windows service?


Source: (StackOverflow)

MongoDB with redis

Can anyone give example use cases of when you would benefit from using Redis and MongoDB in conjunction with each other?


Source: (StackOverflow)

Add new field to a collection in MongoDB [closed]

I can't find how to add a new field to an existent collection.

I know how to update an existent collection's field, but not how to add a new not-existent field in a collection. Also, how do I add new fields to all the collection's documents?


Source: (StackOverflow)

NoSql vs Relational database

Recently NoSQL has gained immense popularity.

What are the advantages of NoSQL over traditional RDBMS?

Thanks in advance.


Source: (StackOverflow)

Use cases for NoSQL

NoSQL has been getting a lot of attention in our industry recently. I'm really interested in what peoples thoughts are on the best use-cases for its use over relational database storage. What should trigger a developer into thinking that particular datasets are more suited to a NoSQL solution. I'm particularly interested in MongoDB and CouchDB as they seem to be getting the most coverage with regard to PHP development and that is my focus.


Source: (StackOverflow)

Is there a query language for JSON?

Is there a (roughly) SQL or XQuery-like language for querying JSON?

I'm thinking of very small datasets that map nicely to JSON where it would be nice to easily answer queries such as "what are all the values of X where Y > 3" or to do the usual SUM / COUNT type operations.

As completely made-up example, something like this:

[{"x": 2, "y": 0}}, {"x": 3, "y": 1}, {"x": 4, "y": 1}]

SUM(X) WHERE Y > 0     (would equate to 7)
LIST(X) WHERE Y > 0    (would equate to [3,4])

I'm thinking this would work both client-side and server-side with results being converted to the appropriate language-specific data structure (or perhaps kept as JSON)

A quick Googling suggests that people have thought about it and implemented a few things (JAQL), but it doesn't seem like a standard usage or set of libraries has emerged yet. While each function is fairly trivial to implement on its own, if someone has already done it right I don't want to re-invent the wheel.

Any suggestions?

Edit: This may indeed be a bad idea or JSON may be too generic a format for what I'm thinking.. The reason for wanting a query language instead of just doing the summing/etc functions directly as needed is that I hope to build the queries dynamically based on user-input. Kinda like the argument that "we don't need SQL, we can just write the functions we need". Eventually that either gets out of hand or you end up writing your own version of SQL as you push it further and further. (Okay, I know that is a bit of a silly argument, but you get the idea..)


Source: (StackOverflow)

SQL (MySQL) vs NoSQL (CouchDB) [closed]

I am in the middle of designing a highly-scalable application which must store a lot of data. Just for example it will store lots about users and then things like a lot of their messages, comments etc. I have always used MySQL before but now I am minded to try something new like couchdb or similar which is not SQL.

Does anyone have any thoughts or guidance on this?


Source: (StackOverflow)

How to empty a redis database?

I've been playing with redis (and add some fun with it) during the last fews days and I'd like to know if there is a way to empty the db (remove the sets, the existing key....) easily.
During my tests, I created several sets with a lot of members, even created sets that I do not remember the name (how can I list those guys though ?).
Any idea about how to get rid of all of them ?


Source: (StackOverflow)