1 / 10

MongoDB

MongoDB. Overview Doctrine ODM Symfony2 with Doctrine ODM. MongoDB vs MySQL. MongoDB - Overview. Collection Relationships: Embedding Linking JSON (BSON) Case study: Blog Post Category. Case Study - Blog. Mysql : 4 tables + 3 references MongoDB :

lamar-mckee
Download Presentation

MongoDB

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MongoDB Overview Doctrine ODM Symfony2 with Doctrine ODM

  2. MongoDBvs MySQL

  3. MongoDB - Overview • Collection • Relationships: • Embedding • Linking • JSON (BSON) • Case study: • Blog • Post • Category

  4. Case Study - Blog • Mysql: • 4 tables + 3 references • MongoDB: • Case 1: 3 collections (2 linkings) • Blog • Post • Category • Case 2: 2 collections (1 embeded + 1 linking) • Blog • Post • Category

  5. Case 1 – All linking • Pros • Same as SQL • Easy to setup • Cons • Slow • Query same as SQL • It’s not a NonSQL

  6. Case 2 – Embed & Link • Pros • Fast • NonSQL query • Cons • Hard to setup

  7. MongoDB - Installation • Installation: http://wiki.vidait.vn/index.php5?title=Getting_Started_with_MongoDB • RockMongo

  8. Doctrine ODM • Document (Entity) • DocumentManager (EntityManager) • Mapping: • @EmbedMany • @EmbedOne • @ReferenceOne • @ReferenceMany

  9. Doctrine ODM – Query Builder • Repository • QueryBuilder

  10. Doctrine ODM – Symfony • DoctrineMongoDBBundle doctrine_mongodb: connections: default: server: mongodb://localhost:27017 options: connect: true default_database: test_database document_managers: default: auto_mapping: true

More Related