DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Databases
  4. Book Review: MongoDB with Python and Ming

Book Review: MongoDB with Python and Ming

Mike Driscoll user avatar by
Mike Driscoll
·
Aug. 14, 12 · Interview
Like (0)
Save
Tweet
Share
4.56K Views

Join the DZone community and get the full member experience.

Join For Free

This week I bought Rick Copeland’s MongoDB with Python and Ming eBook from Amazon. It just came out in July 2012, so I figured I should check it out and see what all the fuss is with MongoDB and the whole NoSQL fad.

Quick Review

  • Why I picked it up: Mainly because I’ve been interested in MongoDB for a while, the book was reasonably priced and I’ve read a little of his SQLAlchemy book. I think I may have even met the guy at PyCon a couple years ago too.
  • Why I finished it: I almost always try to finish a book, especially if I’m going to review it. This one was hard though.
  • I’d give it to: Someone who needed a quick text to get them up to speed on MongoDB and Ming

Book Formats

As far as I can tell, this book is only available as an epub from Lulu or for the Kindle.

Book Contents

The book is approximately 84 pages in length. It contains 6 chapters. Chapters 1 and 2 are introductory in nature. Chapter 1 is your typical throwaway chapter with light descriptions of what will be covered and who the reader ought to be. Suffice it to say, if you don’t know Python already, this book won’t help you. It also won’t help you set up MongoDB. I’m actually surprised that chapter 1 wasn’t a Preface instead. Chapter 2 tells you to go setup MongoDB or use an online service such as MongoLab or MongoHQ. You also learn how to install pyMongo and use it to connect to MongoDB, insert data, run queries, create indexes, delete data, update data, learn to use GridFS, and aggregation in MongoDB (mapreduce, sharding, aggregation framework). Yes, chapter 2 is quite hefty. By the time you finish it, you’ll be almost halfway through the book!

Chapter 3 is on getting the best performance out of MongoDB and discusses upgrades to hardware versus sharding. Chapter 4 introduces Ming (not to be confused with MingW for Windows). Ming is basically an ORM (or ODM – Object Document Mapper) for MongoDB that was written by the people at SourceForge and than open-sourced. Chapter 4 covers Ming pretty thoroughly, including defining the schema imperatively and declaratively. It also covers a lot of the same ground that chapter 2 did (i.e. CRUD) but from a Ming / Session perspective. Chapter 5 builds on chapter 4 in that it talks about another abstract layer that Ming can provide which gives the developer the ability to have automatic persistence, an identity-map, a way to flush multiple updates at once and a few other things. Finally, chapter 6 is an odds and ends chapter containing stuff that didn’t fit anywhere else in the book (that’s the author’s words, not mine). It talks about various ways to enable database migration if the schema changes (such as using the flyaway module) and how to extend the ODM’s mapper.

Review

The book starts out pretty well and the author writes in an engaging manner. However, by the end of chapter 2 I found myself bogged down by code example after code example. Normally that doesn’t bother me, but it feels a little repetitious at times and I feel like there isn’t enough explanation to go along with the source. I only tried a few of the examples out myself, but they seemed to work most of the time. Right before section 2.3, there is a typo in the code where the author uses a findOne() method that doesn’t exist. Instead, it should be find_one(). I tried to find out if pyMongo’s API had changed recently using Google, but I couldn’t find anything. Hopefully that is an isolated case, but as I said, I didn’t test a lot of the code.

The other issue with the book is that there are lots of weird little typos. Usually it’s just mis-spellings although occasionally there are some grammar issues. This is minor stuff, but most spell-checkers I’ve used would have caught the majority of them. There are a few spots where the author rambles a bit or the code sessions are a little hard to follow, but other than that, I thought the book was pretty good. Yes, it gets pretty dry by the end, but that’s true of most programming textbooks. If you are looking to join the legions of MongoDB programmers and you want to stick with Python, then this book should get you started. If you need more information, then MongoDB and Python: Patterns and processes for the popular document-oriented database by Niall O’Higgins might be helpful (note: I haven’t read that one yet).

MongoDB with Python and Ming

Rick Copeland

Amazon

Book MongoDB Python (language)

Published at DZone with permission of Mike Driscoll, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Last Chance To Take the DZone 2023 DevOps Survey and Win $250! [Closes on 1/25 at 8 AM]
  • The Role of Data Governance in Data Strategy: Part II
  • Exploring the Benefits of Cloud Computing: From IaaS, PaaS, SaaS to Google Cloud, AWS, and Microsoft
  • A Beginner's Guide to Back-End Development

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: