Part 1. Getting started

Part 1 of this book provides a broad, practical introduction to MongoDB. It also introduces the JavaScript shell and the Ruby driver, both of which are used in examples throughout the book.

We’ve written this book with developers in mind, but it should be useful even if you’re a casual user of MongoDB. Some programming experience will prove helpful in understanding the examples, though we focus most on MongoDB itself. If you’ve worked with relational databases in the past, great! We compare these to MongoDB often.

MongoDB version 3.0.x is the most recent MongoDB version at the time of writing, but most of the discussion applies to previous versions of MongoDB (and presumably later versions). We usually mention it when a particular feature wasn’t available in previous versions.

You’ll use JavaScript for most examples because MongoDB’s JavaScript shell makes it easy for you to experiment with these queries. Ruby is a popular language among MongoDB users, and our examples show how the use of Ruby in real-world applications can take advantage of MongoDB. Rest assured, even if you’re not a Ruby developer you can access MongoDB in much the same way as in other languages.

In chapter 1, you’ll look at MongoDB’s history, design goals, and application use cases. You’ll also see what makes MongoDB unique as you compare it with other databases emerging in the “NoSQL” space.

In chapter 2, you’ll become conversant in the language of MongoDB’s shell. You’ll learn the basics of MongoDB’s query language, and you’ll practice by creating, querying, updating, and deleting documents. The chapter also features some advanced shell tricks and MongoDB commands.

Chapter 3 introduces the MongoDB drivers and MongoDB’s data format, BSON. Here you’ll learn how to talk to the database through the Ruby programming language, and you’ll build a simple application in Ruby demonstrating MongoDB’s flexibility and query power.

To get the most out of this book, follow along and try out the examples. If you don’t have MongoDB installed yet, appendix A can help you get it running on your machine.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset