Solved

What should I use PDO or ezSQL?

Posted on 2010-11-26
3
1,444 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 109

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MySQL Memory Keeps Increasing 4 36
PHP not parsing ' character 12 40
PHP strings vs array errors 13 23
transaction in asp.net, sql server 6 33
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

803 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