MongoDB & PHP

4,086
-1

Published on

Published in: Career, Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,086
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
22
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

MongoDB & PHP

  1. 1. MongoDB & PHP © 1993-2012. EPAM Systems. All Rights Reserved. Alex Litvinok
  2. 2. Just Intro.
  3. 3. MongoDB is Document-oriented database Full Index support Querying Atomic modifiers Replication & Sharding Map-Reduce & GridFS
  4. 4. MongoDB in SQL terms
  5. 5. Normalized SQL Credo Denormalized True MongoDB
  6. 6. Not Only SQL.
  7. 7. Retains some friendly properties of SQL. AGPL license Written on C++ Custom protocol (BSON)
  8. 8. Best of BigTable and Dynamo Apache license Written on Java Thrift & custom binary (CQL3) protocol
  9. 9. Blazing fast BSD license Written on C/C++ Thrift & custom binary (CQL3) protocol
  10. 10. DB consistency, ease of use Apache license Written on C/C++ HTTP/REST protocol
  11. 11. Graph database - connected data GPL/AGPL/Commercial licenses Written on Java HTTP/REST (or embedding in Java) protocol
  12. 12. Billions of rows X millions of columns Apache license Written on Java HTTP/REST (also Thrift) protocol
  13. 13. MongoDB Documents Cassandra Column families Redis Collections CouchDB Documents Neo4j Graphs Hbase Column families
  14. 14. 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
  15. 15. When? Why?
  16. 16. SAP uses MongoDB as a core component of SAP’s platform- as-a-service (PaaS) offering.
  17. 17. MongoDB is used for back-end storage on the SourceForge front pages, project pages, and download pages for all projects.
  18. 18. The New York Times is using MongoDB in a form-building application for photo submissions.
  19. 19. GitHub uses MongoDB for an internal reporting application.
  20. 20. Foursquare uses MongoDB to store venues and user check- ins into venues, sharding the data over more than 25 machines on Amazon EC2.
  21. 21. They all use MongoDB
  22. 22. And they too..
  23. 23. About Integration.
  24. 24. Native PHP Driver 01. <?php 02. 03. $m = new MongoClient(); 04. $db = $m->selectDB("example"); 05. 06. ?>
  25. 25. 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
  26. 26. 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’]);
  27. 27. CakePHP Doctrine Drupal Kohana Framework Lithium Yii Zend Framework Libraries and Frameworks
  28. 28. ActiveMongo MapReduce API MongoFilesystem Mandango MongoDB Pagination MongoDB PHP ODM Stand-Alone Tools
  29. 29. http://docs.mongodb.org/ecosystem/drivers/php- libraries/
  30. 30. The End.
  31. 31. The End.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×