Switch from MongoDB To MySQL

165 views
Skip to first unread message

SeRiALP

unread,
Aug 2, 2012, 7:26:07 AM8/2/12
to vespol...@googlegroups.com
Hi !

I'm new to symfony2 and i'm starting an e-commerce project, and i was wondering if is there any way to use vespolina bundles With MySQL instead of MongoDB.
I know MongoDB is better but i already start my project using 2 DB (MySQL and PostgreSQL).

or do you know if it's possible to use some bundles with my sql and the others with mongo DB in the same project ?

thank you for your help !
Best regards,

Richard Shank

unread,
Aug 2, 2012, 1:06:08 PM8/2/12
to vespol...@googlegroups.com
It is possible to use MySQL instead of MongoDB. Right now the support for that needs some help, but it is doable. Some of the bundles already have MySQL support added. It is also possible to do a mix between SQL and MongoDB.

The one bundle that is difficult with a relational database is the ProductBundle. There are a number of ways that people try to solve this problem, but the solution I'm going to implement is to use PHPCR for storing Product data. I'm finishing up some refactoring on the CartBundle and as soon as I get that working in the sandbox, I'll be working on the ProductBundle and implementing PHPCR persistence.

Richard

AdamQuadmon

unread,
Aug 2, 2012, 1:57:09 PM8/2/12
to vespol...@googlegroups.com
Hi,
I'm trying to use sonata mongodb bundle to manage mongo document in vespolina:

time ago I read a post about using phpcr in vespolina

can you explain me in which bundles you want to use mongo and in which ones orm or phpcr?

Richard Shank

unread,
Aug 2, 2012, 4:58:19 PM8/2/12
to vespol...@googlegroups.com
Well, to me, PHPCR makes a lot of sense in Products, but I don't see any benefits of using it in the Cart. So the answer is, it depends. Personally, I would be using MongoDB on everything, except perhaps checkout. But I also like the idea of the data mapping in a similar manner to the objects I'm dealing with. However, If I needed some type of versioning with my products, I would go with PHPCR over MongoDB. Early in the project I was a bit pig headed about not wanting to deal with relational dbs, but I have pulled my head out of my ass on that. 

Personally, I think those types of decisions depends a lot on what you are doing. My hope is that as people find different persistence layers that work for their particular system, they will contribute those back to the project. In the mean time, while I am refactoring, I am trying to keep things db agnostic. I know for smaller sites, its a lot easier to have a relational db than a document db, so I would love to see both relational dbs and document dbs supported in time.

Richard

SeRiALP

unread,
Aug 2, 2012, 7:33:15 PM8/2/12
to vespol...@googlegroups.com
Thank You for your response !

The fact is i was hesitating to use vespolina bundles because of MongoDB, why ? because i never use it and it's a little bit hard to get some help on it than MySQL for example...
I found those great Bundles in vespolina-sandbox with the AssetBookingBundle -> https://github.com/inspiran/AssetBookingBundle which can be use with MySQL, but how can i mix this AssetBookingBundle with vespolina Bundles using MongoDB.

That's why i started earlier using the shop-app bundle -> https://github.com/mqmtech/shop-app which is entirely used with Doctrine ORM... But I still want to drop it and try to use vespolina + AssetBookingBundle in the same project with a same DB or a mix Db if u can help me figure out how to make it happen...

Thank you anytime,

br,
Reply all
Reply to author
Forward
0 new messages