HOME
SEARCH
BLOG
SCRIPTS
CONTACT
SEARCH
SEARCH
Disclaimer:
Authors have full rights over their works. Reproduction of any part of the content is prohibited without prior authorization.
×
BOOK PRO MONGODB DEVELOPMENT
DOWNLOAD
SUMMARY
Items Found:
195
About the Author
Chapter 1: Using a Java Client with MongoDB 1
Setting Up the Environment 1
Creating a Maven Project 2
Creating a BSON Document 11
Using a Model to Create a BSON Document 16
Getting Data from MongoDB 22
Updating Data in MongoDB 26
Deleting Data in MongoDB 32
Summary 37
Chapter 2: Using the Mongo Shell 39
Getting Started 39
Setting Up the Environment 39
Starting the Mongo Shell 40
Running a Command or Method in Mongo Shell 42
Using Databases 44
Getting Databases Information 44
Creating a Database Instance 46
Dropping a Database 47
vi
Using Collections 48
Creating a Collection 48
Dropping a Collection 52
Using Documents 53
Adding a Document 53
Adding a Batch of Documents 56
Saving a Document 60
Updating a Document 68
Updating Multiple Documents 71
Finding One Document 74
Finding All Documents 75
Finding Selected Fields 76
Using the Cursor 80
Finding and Modifying a Document 82
Removing a Document 85
Summary 87
Chapter 3: Using MongoDB with PHP 89
Getting Started 89
Overview of the PHP MongoDB Database Driver 89
Setting Up the Environment 91
Installing PHP 92
Installing PHP Driver for MongoDB 93
Creating a Connection 94
Getting Database Info 97
Using Collections 98
Getting a Collection 99
Dropping a Collection 101
Using Documents 102
Adding a Document 102
Adding Multiple Documents 106
Adding a Batch of Documents 107
vii
Finding a Single Document 110
Finding All Documents 112
Finding a Subset of Fields and Documents 114
Updating a Document 117
Updating Multiple Documents 120
Saving a Document 122
Removing a Document 125
Summary 128
Chapter 4: Using MongoDB with Ruby 129
Getting Started 129
Overview of the Ruby Driver for MongoDB 129
Setting Up the Environment 131
Installing Ruby 131
Installing DevKit 133
Installing Ruby Driver for MongoDB 134
Using a Collection 136
Creating a Connection with MongoDB 136
Connecting to a Database 139
Creating a Collection 143
Using Documents 147
Adding a Document 147
Adding Multiple Documents 151
Finding a Single Document 156
Finding Multiple Documents 158
Updating Documents 162
Deleting Documents 169
Performing Bulk Operations 173
Summary 176
Chapter 5: Using MongoDB with Node.js 177
Getting Started 177
Overview of Node.js Driver for MongoDB 177
Setting Up the Environment 178
Installing MongoDB Server 178
Installing Node.js 178
Installing the Node.js Driver for MongoDB 185
Using a Connection 186
Creating a MongoDB Connection 186
Using the Database 191
Using a Collection 198
Using Documents 205
Adding a Single Document 205
Adding Multiple Documents 208
Finding a Single Document 210
Finding All Documents 213
Finding a Subset of Documents 215
Using the Cursor 217
Finding and Modifying a Single Document 221
Finding and Removing a Single Document 224
Replacing a Single Document 227
Updating a Single Document 229
Updating Multiple Documents 233
Removing a Single Document 235
Removing Multiple Documents 237
Performing Bulk Write Operations 239
Summary 242
ix
Chapter 6: Migrating an Apache Cassandra Table to MongoDB 243
Setting Up the Environment 243
Creating a Maven Project in Eclipse 245
Creating a Document in Apache Cassandra 255
Migrating the Cassandra Table to MongoDB 263
Summary 272
Chapter 7: Migrating Couchbase to MongoDB 273
Setting Up the Environment 273
Creating a Maven Project 274
Creating Java Classes 278
Configuring the Maven Project 281
Adding Documents to Couchbase 283
Creating a Couchbase View 288
Migrating Couchbase Documents to MongoDB 292
Summary 296
Chapter 8: Migrating Oracle Database 297
Overview of the mongoimport Tool 297
Setting Up the Environment 298
Creating an Oracle Database Table 299
Exporting an Oracle Database Table to a CSV File 299
Importing Data from a CSV File to MongoDB 301
Displaying the JSON Data in MongoDB 302
Summary 304
Chapter 9: Using Kundera with MongoDB 305
Setting Up the Environment 306
Creating a MongoDB Collection 306
Creating a Maven Project in Eclipse 307
Creating a JPA Entity Class 312
x
Configuring JPA in the persistence.xml Configuration File 318
Creating a JPA Client Class 325
Running CRUD Operations 327
Creating a Catalog 328
Finding a Catalog Entry Using the Entity Class 328
Finding a Catalog Entry Using a JPA Query 329
Updating a Catalog Entry 330
Deleting a Catalog Entry 330
The Kundera-Mongo JPA Client Class 331
Installing the Maven Project 333
Running the Kundera-Mongo JPA Client Class 338
Invoking the KunderaClient Methods 339
Summary 343
Chapter 10: Using Spring Data with MongoDB 345
Setting Up the Environment 345
Creating a Maven Project 346
Installing Spring Data MongoDB 350
Configuring JavaConfig 351
Creating a Model 353
Using Spring Data MongoDB with Template 354
Creating a MongoDB Collection 356
Creating Document Instances 358
Adding a Document 358
Adding a Document Batch 361
Finding a Document by Id 363
Finding One Document 364
Finding All Documents 368
Finding Documents Using a Query 370
xi
Updating the First Document 373
Update Multiple Documents 376
Removing Documents 379
Using Spring Data with MongoDB 389
Getting Document Count 391
Finding Entities from Repository 392
Saving Entities 395
Deleting Entities 399
Deleting a Document By Id 399
Deleting All Documents 400
Summary 404
Chapter 11: Creating an Apache Hive Table with MongoDB 405
Overview of Hive Storage Handler for MongoDB 405
Setting Up the Environment 406
Creating a MongoDB Data Store 409
Creating an External Table in Hive 422
Summary 426
Chapter 12: Integrating MongoDB with Oracle Database in Oracle
Data Integrator 427
Setting Up the Environment 427
Creating the Physical Architecture 430
Creating the Logical Architecture 443
Creating the Data Models 447
Creating the Integration Project 459
Creating the Integration Interface 464
Running the Interface 470
Selecting Integrated Data in Oracle Database Table 476
Summary 476
Index 477