?
Solved

What should I use PDO or ezSQL?

Posted on 2010-11-26
3
Medium Priority
?
1,510 Views
Last Modified: 2012-05-10
Should I be using PDO or ezSQL for database connections?

- What are the benefits of each?
- Which is the most efficient?
- Do they fix inconsistencies between different SQL implementations (for example, MySQL and MSSQL)?
0
Comment
Question by:numberkruncher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 1000 total points
ID: 34218345
My belief is that whatever you choose should be considered a "permanent" choice, and you should write your programming to take advantage of the features of the SQL implementation.  In mySQL, REPLACE INTO is a good example.  It's not "standards compliant" but it works great for lots of things.

Efficiency of the engine is not usually of any importance to the efficiency of the application.  The biggest factors in app performance are data organization and indexes.  If your data relates in normalized, sensible ways you will be able to write efficient queries.

I usually have an abstraction layer of some sort, so that most of my table maintenance can be done with PUT and GET methods.  But most of my programming is SELECT related and there is not a lot of UPDATE work going on.  Not that it is intentional, just that my apps worked out that way.

All that said, I would choose PDO if you want.  Search the PHP.net web site for information about both PDO and ezSQL and you will see why!

Best regards, ~Ray
0
 
LVL 34

Assisted Solution

by:Beverley Portlock
Beverley Portlock earned 1000 total points
ID: 34218395
I would choose either PDO or MySQLi rather than a niche product. ezSQL is used on thousands of websites whereas PDO or MySQLi is measured in millions. My own bias would be MySQLi.

I agree with Ray's points about normalizing the data, but especially on INDEXing the data. Nothing makes a bigger difference then selecting proper indexes. We have solved more performance problems on EE through creating indexes on the database than just about any other measure I can think of.
0
 
LVL 13

Author Closing Comment

by:numberkruncher
ID: 34229480
Thanks for the advice guys, looks like I shall be using PDO then!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this article, we’ll look at how to deploy ProxySQL.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question