TweetSince MongoDB will allow you to store more than just string and int values but also things like arrays … from time to time you might need to know how many items are in an array in your document. For example, say you have a hosting business and to make a good profit you need [...]
Browsing the archives for the Querying category
TweetOne query SQL users are pretty used to writing is DISTINCT with COUNT() to get the number if distinct (unique) rows that match a statement like … SELECT COUNT(DISTINCT(PageURL)) FROM LogTable; This rather simple query will get us back the number of unique PageURL’s in our LogTable … not an amazingly useful query but you get [...]
TweetSay you have a log of hits to your podcast, something like … { “_id” : ObjectId(“4c6c753800ae261d80000009″), “podcastID” : 1, “remoteUserIP” : “10.40.52.55″, “remoteUserSession” : “gpn1vz1crveoqtgtlbh1tgd1″, “remoteUserAgent” : “iTunes/9.2.1 (Macintosh; Intel Mac OS X 10.6.4) AppleWebKit/533.17.8″, “created” : { “date” : “8/18/2010″, “time” : “5:05:12 PM” } } To get a quick snapshot of hits [...]
TweetOne really awesome thing about MongoDB is you can store more then just basic values and types as attributes in your Document like … “Title” : “Blog Post 1″ You can also store arrays and even mores Documents (aka a sub Document/ Subobjects, see below) … This however can be confusing if you are used to [...]
TweetWhat if we want to query just a subset of elements in an array or sub-document? Well let me tell tell you how MongoDB will slice, will dice, will … Okay let’s just focus on the $slice operator (you will need at least MongoDB 1.5.1) … Our Pizza Dinner Suppose you have a pizza document [...]
Search LearnMongo
Follow Us on Twitter!
Sponsors
Speaking
MongoDB Videos
Categories
- Administration (6)
- Announcements (3)
- Books (1)
- Drivers (1)
- GridFS (1)
- GUI (1)
- MongoLA (1)
- MongoSeattle (1)
- MongoSV (1)
- PHP (4)
- Q & A (3)
- Querying (6)
- Quick Tip (5)
- Ruby (1)
- Stackoverflow (1)
- Twitter (2)
-
Recent Posts
Archives
- November 2011 (1)
- October 2011 (1)
- August 2011 (1)
- April 2011 (1)
- February 2011 (1)
- January 2011 (2)
- December 2010 (2)
- November 2010 (1)
- October 2010 (3)
- September 2010 (1)
- August 2010 (10)

-
@ameliamango what about orange trench coats? http://t.co/p0DerRsP10 days ago via Twitter for Mac -
The easy to install, PHP based MongoDB admin tool RockMongo has moved to a new home: http://t.co/FVGIzkEH10 days ago via Twitter for Mac -
Webinar May 10th at 11am / 1pm EDT "MongoDB's New Aggregation Framework" --- http://t.co/kkTJWmX311 days ago via Twitter for Mac -
“@mongodb: #MongoSF starts http://t.co/zcMSbBIO”14 days ago via Twitter for Mac


