Post by Qphoria » Sun Jan 02, 2011 12:33 am

ekerazha wrote:Does it use db transactions? This is critical.
wha?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xsecrets » Sun Jan 02, 2011 1:55 am

Qphoria wrote:wha?
lmao that was my exact reaction, but I decided to keep it to myself. :laugh:

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by ekerazha » Mon Jan 03, 2011 12:20 am

Qphoria wrote:wha?
Database transactions

http://dev.mysql.com/doc/innodb/1.1/en/ ... ransaction

New member

Posts

Joined
Tue Nov 10, 2009 10:13 pm
Location - Italy

Post by Xsecrets » Mon Jan 03, 2011 12:26 am

ekerazha wrote:
Qphoria wrote:wha?
Database transactions

http://dev.mysql.com/doc/innodb/1.1/en/ ... ransaction
from the article
as implemented by InnoDB
opencart uses myism so no no transactions, and I'd hardly call it crititcal as practically no other ecommerce application does it either.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by ekerazha » Mon Jan 03, 2011 12:32 am

Xsecrets wrote: from the article
as implemented by InnoDB
opencart uses myism so no no transactions, and I'd hardly call it crititcal as practically no other ecommerce application does it either.
Yeah, you need InnoDB for transactions with MySQL.
This is critical because integrity is critical for ecommerce applications. Indeed, Magento uses transactions.

New member

Posts

Joined
Tue Nov 10, 2009 10:13 pm
Location - Italy

Post by Qphoria » Mon Jan 03, 2011 2:05 am

then use magento

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ekerazha » Mon Jan 03, 2011 2:13 am

Qphoria wrote:then use magento
Yeah, I like OpenCart, it can be fine for small needs, but for serious business integrity is critical so I'll go for Magento. Thank you for your time.

New member

Posts

Joined
Tue Nov 10, 2009 10:13 pm
Location - Italy

Post by SapporoGuy » Mon Jan 03, 2011 2:35 am

Postgres can do that, but many people have only access to mysql on hosted servers.
Even if Magneto offers it, remember to ask you hosting service if they do.

If you do your own servers, you're set!
You even tune your server to get more juice out it!

Problem is that most of the carts on the net try to go for the 90% percentile for ease of installation.

@ PDO/xPDO
This is one reason why brought the PDO question.
You add a layer to the db but gain:
abstraction, easy to read sql queries, somewhat cleaner code, AND you gain access to several other DBs other than mysql.

Which brings up the point.
Is mysql really the best basket to put all your eggs in?

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by ekerazha » Mon Jan 03, 2011 2:43 am

SapporoGuy wrote:Postgres can do that, but many people have only access to mysql on hosted servers.
Yes, but OpenCart uses MySQL, so adding InnoDB support (to use transactions) would be easier than adding PostgreSQL support.

New member

Posts

Joined
Tue Nov 10, 2009 10:13 pm
Location - Italy

Post by SapporoGuy » Mon Jan 03, 2011 2:48 am

Can you explain in more detail?


@ ease of transition
Not sure, since I'd know what is required to support inno db.
However, I do know that the cart basically would need ever sql query re-written to move to PDO or another adbstraction system.

@ once again
I don't know many hosting services that support inno db for mysql and to add to the fun.
Oracle might just F*uck us all and say "pay royalties".

Which is why the RoR is really keen on moving to mysql lite or some other "open source" DB.

Still comes down to hosting service for most people.

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by Qphoria » Mon Jan 03, 2011 2:52 am

opencart suports many dbs technically.. look in the db folder.. there are different classes for db.. at the moment none of them are working except mysql but it should (theoretically) be as simple as setting up the main class for the individual db

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ekerazha » Mon Jan 03, 2011 3:07 am

SapporoGuy wrote:@ once again
I don't know many hosting services that support inno db for mysql and to add to the fun.
Every hosting service that I've used in the last 6 years allows for InnoDB tables.
However, you can easily check if InnoDB is available.

New member

Posts

Joined
Tue Nov 10, 2009 10:13 pm
Location - Italy

Post by SapporoGuy » Mon Jan 03, 2011 3:24 am

theoretically, yes.

I'm not as knowledgeable as Xsecrets on the db side of things so ...
But I'd still imagine that a fair number of the sql queries might not work due to slight differences between the various DB distros.

@ ekerazha
What do you need to change to make the current sql queries support Inno DB?
I don't have the time at the moment to google and study this and you seem to know the difference.
Could you educate me?

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by ekerazha » Mon Jan 03, 2011 3:41 am

SapporoGuy wrote: What do you need to change to make the current sql queries support Inno DB?
Basically nothing, but avoid things like COUNT(*) queries without WHERE clause, because they are slow on InnoDB (I don't know if OpenCart uses them).
Also, you have to change something if you want to take advantage of things like transactions, using START TRANSACTION, COMMIT etc. statements.

New member

Posts

Joined
Tue Nov 10, 2009 10:13 pm
Location - Italy

Post by Qphoria » Mon Jan 03, 2011 3:48 am

opencart does use both of those

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ekerazha » Mon Jan 03, 2011 3:53 am

Qphoria wrote:opencart does use both of those
What?

E.G.

SELECT COUNT(*) FROM table WHERE value=1 <--- OK

SELECT COUNT(*) FROM table <--- Very slow on InnoDB, COUNT(*) without WHERE clause

New member

Posts

Joined
Tue Nov 10, 2009 10:13 pm
Location - Italy

Post by Qphoria » Mon Jan 03, 2011 4:08 am

oh.. no .. opencart doesn't do any select count without a where clause so that would be ok

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xsecrets » Mon Jan 03, 2011 4:17 am

Qphoria wrote:opencart suports many dbs technically.. look in the db folder.. there are different classes for db.. at the moment none of them are working except mysql but it should (theoretically) be as simple as setting up the main class for the individual db
well yes the classes are there, but I'm 99% certain that if you tried to use it on another db things would break all to pieces. I'm not overly familiar with other db systems, but I'm fairly certain that many of the db queries are using mysql specific syntaxes.

I guess this is where the pdo crap and abstraction or active record would come in, but that would be a nightmare to code.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Mon Jan 03, 2011 4:20 am

Not really sure to be honest.. most syntax is the same for basic queries in all dbs that I've used professionally (oracle, sybase, sql) but haven't tried opencart with other DBs to know for sure.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xsecrets » Mon Jan 03, 2011 4:31 am

Qphoria wrote:Not really sure to be honest.. most syntax is the same for basic queries in all dbs that I've used professionally (oracle, sybase, sql) but haven't tried opencart with other DBs to know for sure.
true if all your queries are purely standard, It's been a long time since I looked into what all is part of the standard, since I pretty much only use mysql, but I'm pretty sure some of the stuff used heavily is not standard.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US
Who is online

Users browsing this forum: No registered users and 20 guests