concept Mongo in category express

This is an excerpt from Manning's book Express in Action: Writing, building, and testing Node.js applications.
For one, Mongo is popular. That isn’t in itself a merit, but it has a few benefits. You won’t have trouble finding help online. It’s also useful to know; it’s used in lots of places by lots of people. Mongo is also a mature project. It’s been around since 2007 and is trusted by companies like eBay, Craigslist, and Orange. You won’t be using buggy, unsupported software.
Mongo is popular in part because it’s mature, feature filled, and reliable. It’s written in performant C++ and is trusted by myriad users.
Although Mongo isn’t written in JavaScript, its native shell uses JavaScript. That means that when you open Mongo to play around in the command line, you send it commands with JavaScript. It’s pretty nice to be able to talk to the database with a language you’re already using.
I also chose Mongo for this chapter because I think it’s easier to learn than SQL for a JavaScript developer. SQL is a powerful programming language unto itself, but you already know JavaScript!
I hardly believe that Mongo is the right choice for all Express applications. Relational databases are incredibly important and can be used well with Express, and other NoSQL databases like CouchDB are also powerful. But Mongo fits well with the Express ecosystem and is relatively easy to learn (compared to SQL), which is why I chose it for this chapter.
Before we start, let’s talk about how Mongo works. Most applications have one database, like Mongo. These databases are hosted by servers. A Mongo server can have many databases on it, but there is generally one database per application. If you’re developing only one application on your computer, you’ll likely have only one Mongo database. (These databases can be replicated across multiple servers, but you treat them as if they’re one database.)
To access these databases, you’ll run a Mongo server. Clients will talk to these servers, viewing and manipulating the database. There are client libraries for most programming languages; these libraries are called drivers and let you talk to the database in your favorite programming language. In this book, we’ll be using the Node driver for Mongo.
One last important point: Mongo adds a unique _id property to every document. Because these IDs are unique, two documents are the same if they have the same _id property, and you can’t store two documents with the same ID in the same collection. This is a miscellaneous point but an important one that we’ll come back to!