Solved

What should I use PDO or ezSQL?

Posted on 2010-11-26
3
1,435 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
3 Comments
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 250 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 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
The viewer will learn how to dynamically set the form action using jQuery.

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now