Presentation is loading. Please wait.

Presentation is loading. Please wait.

MongoDB - Overview - Doctrine ODM - Symfony2 with Doctrine ODM.

Similar presentations


Presentation on theme: "MongoDB - Overview - Doctrine ODM - Symfony2 with Doctrine ODM."— Presentation transcript:

1 MongoDB - Overview - Doctrine ODM - Symfony2 with Doctrine ODM

2 MongoDB vs MySQL MySQLMongoDB Termsdatabase tablescollection rowdocument QuerySELECTfind INSERTinsert …… Operator>$gt <=$lte DataTypeSame String (json/serialized)Mixed

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=Getti ng_Started_with_MongoDB http://wiki.vidait.vn/index.php5?title=Getti ng_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


Download ppt "MongoDB - Overview - Doctrine ODM - Symfony2 with Doctrine ODM."

Similar presentations


Ads by Google