# MongoDB and PHP, The Book

By Steve Francia · February 13, 2012 · https://spf13.com/post/mongodb-and-php-the-book/

I wrote a book. It is published by O’Reilly, and available now on Amazon, O’Reilly Media and
a bunch of other sites, available in both print and as an ebook.

From the introduction:

> What would happen if you optimized a data store for the operations
> application developers actually use? You’d arrive at MongoDB, the
> reliable document-oriented database. With this concise guide, you’ll
> learn how to build elegant database applications with [mongodb and php](/post/getting-started-with-mongodb-and-php/).
>
> Written by the Chief Solutions Architect at 10gen—the company that
> develops and supports this open source database—this book takes you
> through MongoDB basics such as queries, read-write operations, and
> administration, and then dives into MapReduce, sharding, and other
> advanced topics. Get out of the relational database rut, and take
> advantage of a high-performing system optimized for operations and
> scale.
>
> -   Learn step-by-step the tools you need to build PHP applications
>     with MongoDB
> -   Perform Create, Read, Update, and Delete (CRUD) operations, and
>     learn how to perform queries to retrieve data
> -   Administer your database, and access and manipulate data with the
>     MongoDB Shell
> -   Use functions to work with sets, arrays, and multiple documents to
>     perform synchronous, asynchronous, and atomic operations
> -   Discover PHP’s community tools and libraries, and why they’re
>     valuable
> -   Work with regular expressions, aggregation, MapReduce,
>     replication, and sharding

So far reviews have been quite positive, with most criticisms coming
from the short length. O’Reilly has begun a new program where they
release shorter books for less money and get them to market much
quicker. It makes a lot of sense, most tech books take 2 – 3 years to
write the 200 – 400 pages and by the time the are ready to print, a lot
of the technology has changed.  The nice thing about these shorter books
is they are on the market much faster and much less over head is spent.
It also makes for easier reading for you as it’s more digestible.

[mongodb and php](/post/getting-started-with-mongodb-and-php/)  tops out just shy of 80 pages, my contract with
O’Reilly was for 50 pages so I did my very best to put as much as
possible into the text and completely agree with the challenge of
covering an entire topic in a short amount of space.

That said, I do feel it’s fairly comprehensive and invite anyone to
[message me](/contact "Contact") and I’ll gladly write a
blog post explaining the topic in further detail.

I really enjoyed the process of writing a book. It was a lot of work
with a lot of very late nights and patience on the part of my family
with whom I’m very appreciative.

Purchasing MongoDB and PHP
==========================

You can purchase the book directly from [O’Reilly in a non DRM format
here](http://shop.oreilly.com/product/0636920022381.do).

Media Reviews
=============

> "If you have been contemplating diving into PHP and/or MongoDB, this is a worthy book to add to your learning and reference collections."
> <cite>Si Dunn, [Sagecreek Productions](http://sagecreek.wordpress.com/2012/03/16/mongodb-and-php-document-oriented-data-for-web-developers-bookreview-in-programming/)</cite>

> "The book "PHP and MongoDB by Steve Francia" presents the document-oriented database MongoDB and its relationship with the PHP language, is also a very good introduction to non-relational databases, focusing on the causes that gave rise to MongoDB, as well as the gaps found in the ORM's and the relational databases when you need to work with objects in an efficient and robust way."
> <cite> Juan Benitez, [www.tecnopedia.net](http://www.oreillynet.com/pub/blogger/juanbenitez)

> “I have already have read the book MongoDB: The Definitive Guide by
> Kristina Chodorow and Michael Dirolf . It doesn’t cover much on the PHP,
> but its a good book to learn about MongoDB and how it works in Depth.
> Once I saw the book, MongoDB and PHP by Steve Francia I was planning to
> buy it, and the time I got a chance to signup for the blogger review
> program by O’Reilly Media. Its a small book of 60 pages, but a good one.
> I will rate 7.5 / 10 , a good read for PHP Developers . If you wondered
> why the 2.5 is missing read on” [Full Review
> \>](http://harikt.com/mongodb-and-php-steve-francia-oreilly)<br>
> <cite>Hari K T, [harikt.com/blog](http://www.oreillynet.com/pub/blogger/harikt)</cite>

