Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

MySQL(i) only? Why? 
 
Techi
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2007-08-31
Prague
 

I dont understand why is not used the traditional way for database access such is in zend framework?

I believe magento is the right project to see, that you can use almost any type of database thanks to Zend_Db and no more subclassing of database adapters is needed

I hope it wont be any problem to use custom database in future such as posgre or mssql

 
Magento Community Magento Community
Magento Community
Magento Community
 
Scott
Guru
 
Avatar
Total Posts:  333
Joined:  2007-08-31
Northwest Ohio
 

This is the perfect opportunity for you to dig in and extend the system to support your desired database type. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
austinstorm
Member
 
Avatar
Total Posts:  31
Joined:  2007-08-31
Moscow, ID
 

It’s true, you should extend it and contribute to the project.

MSSQL is wretched, and that’s not just anti-MS bias. In fact, I like those folks in Redmond. As for ‘posgre’, I’ve used it before but don’t know much about it. MySQL is indisputably the king of the sql world.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Database support is a broad theme and will be addressed in much greater detail on the tutorial pages.

For now i can say that architecture of Magento allows different db connections per module.

This is useful when you have especially large data storage needs for specific modules, such as orders or customers.

Also, each module can have different connections for setup, write, read purposes. This is useful in cluster environments.

Each connection is configured to use Zend_Db connection. For our purposes we have extended default functionality of Zend_Db_Adapter_Mysqli and Zend_Db_Adapter_Pdo_Mysql in Varien_Db_Adapter library.

We have a goal of separating the Object Models from Resource Models.
Diagrams will be published, explaining Magento inner architecture.

Basically that means separating the logic specific to resource (db) and logic specific to abstract model.

For example, Customer model has logic that does not depend on database such as sending welcome email. This resides in Object Model.

On opposite, the save method is direct functionality of database, and can be implemented differently with different engines or approaches.

That’s why save() functionality is in Resource Model and Object Model just uses it without actually caring how it does it, only by knowing the right API interface.

The Resource Model can save the customer using regular access to Tables (mysql4) or by calling procedures and relying on triggers (mysql5, mssql, postgresql, oracle, etc.)

PHP code that would support different methods can be totally different, and that’s where the flexibility of Resource Models shines.

More on that in the future smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
derfy
Jr. Member
 
Total Posts:  2
Joined:  2007-08-31
 

Can’t wait for the future Moshe smile Nice preview of what will be available to us.
Thx for the great job

 
Magento Community Magento Community
Magento Community
Magento Community
 
Burnt
Jr. Member
 
Total Posts:  4
Joined:  2008-10-30
 

"As for ‘posgre’, I’ve used it before but don’t know much about it. MySQL is indisputably the king of the sql world.”

PostgreSQL has always been the DB of choice for people who make a living with databases and who’s reputation and income is based on reliability and real-life (=multi-user) performance.

MySQL is only “king” in terms of installations - and this is simply due to the fact that it has been bundled with PHP for many years. And as webserver admins and users often prefer the short way they did not bother which DB-module was (automagically) installed.
Having a simple, fast SQL-Backend is fine for simple webapps in a hosted (multi-user multi-domain) environment.

But when the data models become more complicated and you may have to work with your data in flexible ways separate from an individual application, then you want a database that is thorougly constructed, tested and developed.
In the open source field you also want transparency of the developement, you want to dig into the developers mailing lists if you find something irritating etc., and get answers that show there are people who care.

I understand that there are more developers on the market with MySQL-experience, but for a quite complicated - and for many businesses central and crucial - product like a webshop the choice should be oriented on quality not history.

At the moment I am not in the position to develope the PostgreSQL “interface” for a huge app like Magento out of my ressources, nor will my clients pay for it. And this would not be a one-time project but an iterating work with each addition or design change by the core developers, because, as we read here, the DB is at the core of such a developement.

Then, being able to use “multiple” DBs may be a fine feature for certain (complicated) situations, but most of the users/admins will stick to one database for one application, and my advise is also: for one company.

So, realistically - unless the core team decides to actively support (or care for) PostgreSQL we will not see it supported and we will not see it work in practice with Magento.
An analog discussion comes up from time to time in the Typo3 community - and the outcome is just this (version 5 may change this, we’ll see).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Zaboo
Jr. Member
 
Total Posts:  2
Joined:  2008-10-09
 

This is desappointing..

I’m a trainee in a company that wishes to integrate a management software based on PostGreSQL with a eCommerce software. They decided, based on the available features that Magento would probably be the best choice. But the problem is that Magento only supports MySQL.

So, my job is to find a way to do this integration. At the beggining of my research, I was hoping that I could do this with one or two changes into Magento source code (I think my boss thought the same). But this optimism started to fall apart when I saw this topic

Specifically this

So, realistically - unless the core team decides to actively support (or care for) PostgreSQL we will not see it supported and we will not see it work in practice with Magento.

So, I wonder if i’m wasting my time trying to do this by myself..  Are we really talking about a huge project or its possible with a few changes to make it work? (I would like to have a reply from the magento team..) I thought Zend DB was the key to this…

If this is really possible to people who don’t have a deep knowledge of the whole Magento source code, then do someone have any idea on where should I start?

thanks in advance and sorry for the poor english =)

[]’s,
Zaboo

 
Magento Community Magento Community
Magento Community
Magento Community
 
Burnt
Jr. Member
 
Total Posts:  4
Joined:  2008-10-30
 

From my experience, being able to a) connect to another database (through a layer like ZendDB or AdoDB) and b) switch a complex application over to another DB are two separate stories.
And if you look at Magento’s data model you’ll see that it uses the EAV model in the core (i.e. for products). This could make the transition (and the possible error situations) even more complex.
But this is just speculation, and a comment by the developers might proove me wrong quickly - so it would be interesting to hear from them.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Zaboo
Jr. Member
 
Total Posts:  2
Joined:  2008-10-09
 

I would like to hear (read) from them too…

Anyway, thanks for the fast answer Burnt. I’ll continue my research and post if I find out anything…

[]’s

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top