MongoDB & PHP by Alex Litvinok
Upcoming SlideShare
Loading in...5

MongoDB & PHP by Alex Litvinok



Александр на протяжении длительного времени занимался тестированием драйверов MongoDB для разных языков, в том ...

Александр на протяжении длительного времени занимался тестированием драйверов MongoDB для разных языков, в том числе и PHP. В докладе:
- Введение в MongoDB
- Сравнение NoSQL баз данных
- Ответы на популярные вопросы: как? когда? почему?
- MongoDB и PHP фреймворки



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    MongoDB & PHP by Alex Litvinok MongoDB & PHP by Alex Litvinok Presentation Transcript

    • MongoDB & PHP © 1993-2012. EPAM Systems. All Rights Reserved. Alex Litvinok
    • Just Intro.
    • MongoDB is Document-oriented database Full Index support Querying Atomic modifiers Replication & Sharding Map-Reduce & GridFS
    • MongoDB in SQL terms
    • Normalized SQL Credo Denormalized True MongoDB
    • Not Only SQL.
    • Retains some friendly properties of SQL. AGPL license Written on C++ Custom protocol (BSON)
    • Best of BigTable and Dynamo Apache license Written on Java Thrift & custom binary (CQL3) protocol
    • Blazing fast BSD license Written on C/C++ Thrift & custom binary (CQL3) protocol
    • DB consistency, ease of use Apache license Written on C/C++ HTTP/REST protocol
    • Graph database - connected data GPL/AGPL/Commercial licenses Written on Java HTTP/REST (or embedding in Java) protocol
    • Billions of rows X millions of columns Apache license Written on Java HTTP/REST (also Thrift) protocol
    • MongoDB Documents Cassandra Column families Redis Collections CouchDB Documents Neo4j Graphs Hbase Column families
    • B-Tree MongoDB Memtable / SSTable Cassandra In-Memory with snapshots Redis Append-only B-Tree CouchDB On-disk linked lists Neo4j Memtable / SSTable on HDFS Hbase
    • When? Why?
    • SAP uses MongoDB as a core component of SAP’s platform- as-a-service (PaaS) offering.
    • MongoDB is used for back-end storage on the SourceForge front pages, project pages, and download pages for all projects.
    • The New York Times is using MongoDB in a form-building application for photo submissions.
    • GitHub uses MongoDB for an internal reporting application.
    • Foursquare uses MongoDB to store venues and user check- ins into venues, sharding the data over more than 25 machines on Amazon EC2.
    • They all use MongoDB
    • And they too..
    • About Integration.
    • Native PHP Driver 01. <?php 02. 03. $m = new MongoClient(); 04. $db = $m->selectDB("example"); 05. 06. ?>
    • ent class . ongoDB class ection class . sor class . . The Mon The MongoD . The . . The Mo The MongoClient class The MongoDB class The MongoCollection class The MongoCursor class
    • 01. $m = new MongoClient(); 02. $db = $m->comedy; 03. $coll = $db->cartoons; 04. 05. $call->insert([‘name’=>’Alex’]); 06. 07. $result = $call->find(); 08. $result = $call->find([‘name’ => ‘Alex’]);
    • CakePHP Doctrine Drupal Kohana Framework Lithium Yii Zend Framework Libraries and Frameworks
    • ActiveMongo MapReduce API MongoFilesystem Mandango MongoDB Pagination MongoDB PHP ODM Stand-Alone Tools
    • libraries/
    • The End.
    • The End.