Learning MongoDB from scratch with PHP – Live Coding
MongoDB is a NoSQL database that stores JavaScript objects, PHP associative arrays, and whatever native data types your programming language supports that uses the MongoDB drivers. This live coding video shows my first experience with this awesome datastore. I’ll walk you through how to install it on Ubuntu using the command:
sudo apt-get install mongodb-server
The PHP drivers for it can be installed using the command:
pecl install mongo
After you have the database server installed, just run it from the shell and start inputting MySQL like commands. To use Mongo from PHP, first you’ll need to instantiate a MongoClient object, then select the appropriate database you want to use.
If you’re coming from the world of RDBMS (relational data base systems), you’re familiar with tables, columns, rows, and schemas. In Mongo, their equivalents are collections, attributes, and documents. That’s why they call this data model a “document oriented” architecture.
Copyright (c) 2013 Rodrigo Silveira – http://www.easylearntutorial.com
source