About the Author |
|
xiii | |
About the Technical Reviewers |
|
xv | |
Introduction |
|
xvii | |
|
Chapter 1 Using a Java Client with MongoDB |
|
|
1 | (38) |
|
Setting Up the Environment |
|
|
1 | (1) |
|
|
2 | (9) |
|
|
11 | (5) |
|
Using a Model to Create a BSON Document |
|
|
16 | (6) |
|
Getting Data from MongoDB |
|
|
22 | (4) |
|
|
26 | (6) |
|
|
32 | (5) |
|
|
37 | (2) |
|
Chapter 2 Using the Mongo Shell |
|
|
39 | (50) |
|
|
39 | (5) |
|
Setting Up the Environment |
|
|
39 | (1) |
|
|
40 | (2) |
|
Running a Command or Method in Mongo Shell |
|
|
42 | (2) |
|
|
44 | (4) |
|
Getting Databases Information |
|
|
44 | (2) |
|
Creating a Database Instance |
|
|
46 | (1) |
|
|
47 | (1) |
|
|
48 | (5) |
|
|
48 | (4) |
|
|
52 | (1) |
|
|
53 | (34) |
|
|
53 | (3) |
|
Adding a Batch of Documents |
|
|
56 | (4) |
|
|
60 | (8) |
|
|
68 | (3) |
|
Updating Multiple Documents |
|
|
71 | (3) |
|
|
74 | (1) |
|
|
75 | (1) |
|
|
76 | (4) |
|
|
80 | (2) |
|
Finding and Modifying a Document |
|
|
82 | (3) |
|
|
85 | (2) |
|
|
87 | (2) |
|
Chapter 3 Using MongoDB with PHP |
|
|
89 | (40) |
|
|
89 | (9) |
|
Overview of the PHP MongoDB Database Driver |
|
|
89 | (2) |
|
Setting Up the Environment |
|
|
91 | (1) |
|
|
92 | (1) |
|
Installing PHP Driver for MongoDB |
|
|
93 | (1) |
|
|
94 | (3) |
|
|
97 | (1) |
|
|
98 | (4) |
|
|
99 | (2) |
|
|
101 | (1) |
|
|
102 | (26) |
|
|
102 | (4) |
|
Adding Multiple Documents |
|
|
106 | (1) |
|
Adding a Batch of Documents |
|
|
107 | (3) |
|
Finding a Single Document |
|
|
110 | (2) |
|
|
112 | (2) |
|
Finding a Subset of Fields and Documents |
|
|
114 | (3) |
|
|
117 | (3) |
|
Updating Multiple Documents |
|
|
120 | (2) |
|
|
122 | (3) |
|
|
125 | (3) |
|
|
128 | (1) |
|
Chapter 4 Using MongoDB with Ruby |
|
|
129 | (48) |
|
|
129 | (7) |
|
Overview of the Ruby Driver for MongoDB |
|
|
129 | (2) |
|
Setting Up the Environment |
|
|
131 | (1) |
|
|
131 | (2) |
|
|
133 | (1) |
|
Installing Ruby Driver for MongoDB |
|
|
134 | (2) |
|
|
136 | (11) |
|
Creating a Connection with MongoDB |
|
|
136 | (3) |
|
|
139 | (4) |
|
|
143 | (4) |
|
|
147 | (29) |
|
|
147 | (4) |
|
Adding Multiple Documents |
|
|
151 | (5) |
|
Finding a Single Document |
|
|
156 | (2) |
|
Finding Multiple Documents |
|
|
158 | (4) |
|
|
162 | (7) |
|
|
169 | (4) |
|
Performing Bulk Operations |
|
|
173 | (3) |
|
|
176 | (1) |
|
Chapter 5 Using MongoDB with Node.js |
|
|
177 | (66) |
|
|
177 | (9) |
|
Overview of Node.js Driver for MongoDB |
|
|
177 | (1) |
|
Setting Up the Environment |
|
|
178 | (1) |
|
Installing MongoDB Server |
|
|
178 | (1) |
|
|
178 | (7) |
|
Installing the Node.js Driver for MongoDB |
|
|
185 | (1) |
|
|
186 | (19) |
|
Creating a MongoDB Connection |
|
|
186 | (5) |
|
|
191 | (7) |
|
|
198 | (7) |
|
|
205 | (37) |
|
|
205 | (3) |
|
Adding Multiple Documents |
|
|
208 | (2) |
|
Finding a Single Document |
|
|
210 | (3) |
|
|
213 | (2) |
|
Finding a Subset of Documents |
|
|
215 | (2) |
|
|
217 | (4) |
|
Finding and Modifying a Single Document |
|
|
221 | (3) |
|
Finding and Removing a Single Document |
|
|
224 | (3) |
|
Replacing a Single Document |
|
|
227 | (2) |
|
Updating a Single Document |
|
|
229 | (4) |
|
Updating Multiple Documents |
|
|
233 | (2) |
|
Removing a Single Document |
|
|
235 | (2) |
|
Removing Multiple Documents |
|
|
237 | (2) |
|
Performing Bulk Write Operations |
|
|
239 | (3) |
|
|
242 | (1) |
|
Chapter 6 Migrating an Apache Cassandra Table to MongoDB |
|
|
243 | (30) |
|
Setting Up the Environment |
|
|
243 | (2) |
|
Creating a Maven Project in Eclipse |
|
|
245 | (10) |
|
Creating a Document in Apache Cassandra |
|
|
255 | (8) |
|
Migrating the Cassandra Table to MongoDB |
|
|
263 | (9) |
|
|
272 | (1) |
|
Chapter 7 Migrating Couchbase to MongoDB |
|
|
273 | (24) |
|
Setting Up the Environment |
|
|
273 | (1) |
|
|
274 | (4) |
|
|
278 | (3) |
|
Configuring the Maven Project |
|
|
281 | (2) |
|
Adding Documents to Couchbase |
|
|
283 | (5) |
|
Creating a Couchbase View |
|
|
288 | (4) |
|
Migrating Couchbase Documents to MongoDB |
|
|
292 | (4) |
|
|
296 | (1) |
|
Chapter 8 Migrating Oracle Database |
|
|
297 | (8) |
|
Overview of the mongoimport Tool |
|
|
297 | (1) |
|
Setting Up the Environment |
|
|
298 | (1) |
|
Creating an Oracle Database Table |
|
|
299 | (1) |
|
Exporting an Oracle Database Table to a CSV File |
|
|
299 | (2) |
|
Importing Data from a CSV File to MongoDB |
|
|
301 | (1) |
|
Displaying the JSON Data in MongoDB |
|
|
302 | (2) |
|
|
304 | (1) |
|
Chapter 9 Using Kundera with MongoDB |
|
|
305 | (40) |
|
Setting Up the Environment |
|
|
306 | (1) |
|
Creating a MongoDB Collection |
|
|
306 | (1) |
|
Creating a Maven Project in Eclipse |
|
|
307 | (5) |
|
Creating a JPA Entity Class |
|
|
312 | (6) |
|
Configuring JPA in the persistence.xml Configuration File |
|
|
318 | (7) |
|
Creating a JPA Client Class |
|
|
325 | (2) |
|
|
327 | (4) |
|
|
328 | (1) |
|
Finding a Catalog Entry Using the Entity Class |
|
|
328 | (1) |
|
Finding a Catalog Entry Using a JPA Query |
|
|
329 | (1) |
|
|
330 | (1) |
|
|
330 | (1) |
|
The Kundera-Mongo JPA Client Class |
|
|
331 | (12) |
|
Installing the Maven Project |
|
|
333 | (5) |
|
Running the Kundera-Mongo JPA Client Class |
|
|
338 | (1) |
|
Invoking the KunderaClient Methods |
|
|
339 | (4) |
|
|
343 | (2) |
|
Chapter 10 Using Spring Data with MongoDB |
|
|
345 | (60) |
|
Setting Up the Environment |
|
|
345 | (1) |
|
|
346 | (4) |
|
Installing Spring Data MongoDB |
|
|
350 | (1) |
|
|
351 | (2) |
|
|
353 | (1) |
|
Using Spring Data MongoDB with Template |
|
|
354 | (35) |
|
Creating a MongoDB Collection |
|
|
356 | (2) |
|
Creating Document Instances |
|
|
358 | (1) |
|
|
358 | (3) |
|
|
361 | (2) |
|
|
363 | (1) |
|
|
364 | (4) |
|
|
368 | (2) |
|
Finding Documents Using a Query |
|
|
370 | (3) |
|
Updating the First Document |
|
|
373 | (3) |
|
Update Multiple Documents |
|
|
376 | (3) |
|
|
379 | (10) |
|
Using Spring Data with MongoDB |
|
|
389 | (15) |
|
|
391 | (1) |
|
Finding Entities from Repository |
|
|
392 | (3) |
|
|
395 | (4) |
|
|
399 | (1) |
|
Deleting a Document By Id |
|
|
399 | (1) |
|
|
400 | (4) |
|
|
404 | (1) |
|
Chapter 11 Creating an Apache Hive Table with MongoDB |
|
|
405 | (22) |
|
Overview of Hive Storage Handler for MongoDB |
|
|
405 | (1) |
|
Setting Up the Environment |
|
|
406 | (3) |
|
Creating a MongoDB Data Store |
|
|
409 | (13) |
|
Creating an External Table in Hive |
|
|
422 | (4) |
|
|
426 | (1) |
|
Chapter 12 Integrating MongoDB with Oracle Database in Oracle Data Integrator |
|
|
427 | (50) |
|
Setting Up the Environment |
|
|
427 | (3) |
|
Creating the Physical Architecture |
|
|
430 | (13) |
|
Creating the Logical Architecture |
|
|
443 | (4) |
|
|
447 | (12) |
|
Creating the Integration Project |
|
|
459 | (5) |
|
Creating the Integration Interface |
|
|
464 | (6) |
|
|
470 | (6) |
|
Selecting Integrated Data in Oracle Database Table |
|
|
476 | (1) |
|
|
476 | (1) |
Index |
|
477 | |