PHP Classes

The future of databases

Recommend this page to a friend!

      PHP Classes blog  >  The Plot to Kill PHP ...  >  All threads  >  The future of databases  >  (Un) Subscribe thread alerts  
Subject:The future of databases
Summary:The future of SQL
Author:Ricardo Fernandes
Date:2011-07-15 09:42:25
Update:2011-07-16 07:58:17

  1. The future of databases   Reply   Report abuse  
Ricardo Fernandes - 2011-07-15 09:57:10
If that means that PHP will be lighter, fine by me. To be honest, I'm using a lot less MySQL nowadays. I'm dropping MySQL for noSQL databases (in my case, MongoDB) for performance and freedom. And I believe that more people will start using it because it's simply faster.

I remember back in 2002 that was a thread concerning php5 backward compatibility. There was a lot of people that asked for a multiversion php. Where you could have php4 AND php5 code. That would require two binaries but I think that would be acceptable. The code block would be intantiated with <?php4 or <?php (for php5). But there were performance problems in apache and a lot of core dumps were thrown. And the concept was left behind.

Now I think it's gaining voice again with the approaching php6.

Less core mean less footprint. And that lead to better performance. Burn MySQL extension! ehe

My 2 cents

  2. Re: The future of databases   Reply   Report abuse  
Manuel Lemos - 2011-07-15 10:13:30 - In reply to message 1 from Ricardo Fernandes
Most PHP extensions are optional. You can build PHP without them, including MySQL.

The problem is that most PHP applications need MySQL and rely on the old mysql extension.

Removing this extension means either people spend time and money rewriting their code, or not upgrading to the newer version.

That is why many PHP developers avoided to upgrade to PHP 5 for many years, and only did so because they were forced.

  3. Re: The future of databases   Reply   Report abuse  
Richard Quadling - 2011-07-15 15:36:17 - In reply to message 2 from Manuel Lemos
The developers aren't "forced" to do anything. I run Windows XP. I'm not "forced" to upgrade. I make the decision based upon my ability to deal with the consequences of not upgrading.

And so should developers. If their applications are capable of dealing with the inefficiencies and lack of features in the older extension, then they are more than capable of deciding to upgrade or not.

Ultimately, things move on. We don't have a man waving a red flag, walking in front of the car anymore. Instead, the latest attempt to set a new land speed record is going for 1,000 mph.

Things change, roll with it.

Think of it as a business opportunity. Your customers have either paid for what they got and will pay again for an upgrade, or you have a maintenance contract - in which case, upgrading the code is money for old rope. Work once, get paid many times over.

And, if you don't refactor your code to take account the new features and facilities, someone else will.

So. It really is comes down to a cost-benefit analysis.

Do nothing and lose the customer. Do something, get paid for it, keep the customer.

A no-brainer really.


What are you waiting for?

Open up your IDE and join the plot to kill mysql.

  4. Re: The future of databases   Reply   Report abuse  
Ricardo Fernandes - 2011-07-15 15:40:34 - In reply to message 2 from Manuel Lemos
And I'm glad they were. The quality step from 4 to 5 is enormous. PHP5 can bring some dignity back to the language. I hope that in the next step it be quicker.

  5. Re: The future of databases   Reply   Report abuse  
Manuel Lemos - 2011-07-15 18:41:14 - In reply to message 3 from Richard Quadling
The problem is that many, many site owners are not the people that developed the sites. They have no clue about programming, they had to hire somebody to do it. If they need to change their code, they need to pay again to do it. But they are not even aware about it.

Ultimately this will lead to the same problem with PHP 5 adoption. Hosting companies refuse to upgrade to not upset their customers and not take the chances to loose them.

  6. Re: The future of databases   Reply   Report abuse  
Richard Quadling - 2011-07-15 20:45:29 - In reply to message 5 from Manuel Lemos
Those sites owners don't need to upgrade if there site is functioning.

And if new work is needed, they can continue to use their existing library.

Nothing's changed.

All that is happening is that PHP group are moving to deprecate support for this ancient extension and suggest much better alternatives.

It is being done slowly. First it is just in the documentation. Letting developers know what is happening.

But, the issues you raise are the same issues that are raised whenever anything changes. Someone, somewhere is going to be moaning about it.

I think it is just human nature.

The common counter argument of "if it ain't broke, don't fix it" is spurious. It _IS_ broke. And PHP is taking small steps to fix it. In this case, fix is replace.

It was no difference during the Y2K issue a little over a decade ago. Even though the entire world was told about the issues, many businesses left it right until the last minute until they replaced or upgraded their ancient systems.

The same will happen here.

Switched on businesses will make the change.

Switched off businesses won't.

Some will survive. Others won't.

I very much doubt the survival will have anything to do with ext/mysql being deprecated by The PHP Group.

If ISP's decide that NOT upgrading PHP is their best way to keep customers, then they have to be able to respond to those customers that ARE switched on enough to want the upgrade. So. Either they will or won't.

I think the issue would be a lot more dramatic if it was, say, PHP was killing mysql db support entirely. Now THAT would be a big issue.

  7. Re: The future of databases   Reply   Report abuse  
CJ - 2011-07-15 20:46:33 - In reply to message 5 from Manuel Lemos
This argument about development costs is exactly why application developers writing code today should be using a better extension, namely "mysqli".

Some people might think that PHP application developers should not even need to be told that the "mysql" extension is old, lacks the features of "mysqli", has problems, and should not be used. However in reality it is only by all of us promoting best practices that this will occur and paying customers will get high quality, maintainable sites.

Philip is only suggesting that the core PHP documentation starts promoting the newer (though available for a long time) "mysqli" extension and PDO_MYSQL driver for PDO. This is commendable.

twitter: @ghrd

  8. Re: The future of databases   Reply   Report abuse  
Manuel Lemos - 2011-07-16 04:10:35 - In reply to message 3 from Richard Quadling
Your use of Windows XP in your machine is not comparable to site owners that can only afford shared hosting. Those site owners have no choice, they use the PHP version that the hosting company provides and deal with it. They cannot tell the hosting company to upgrade or downgrade the PHP version.

If all hosting companies upgrade their PHP version to one that no longer has support to old mysql extension, their sites that need that extension will just stop working.

Anyway, the main point you seem to be missing is that many, many sites are owned by people that are not developers. They hired a developer once in the past that wrote code that relied on the mysql extension.

Those site owners have no clue that their sites will stop working in the future if the mysql extension is dropped. They do not even know that they may need to pay a developer again to rewrite their sites code just because the mysql extension will be dropped.

  9. Re: The future of databases   Reply   Report abuse  
Manuel Lemos - 2011-07-16 07:58:17 - In reply to message 6 from Richard Quadling
I am still amazed to find how many people seem to ignore how shared hosting works.

Let me give a probably different view from how it works. Customers do not have the right to choose the PHP version.

If the hosting company decides to upgrade to a newer version for some reason, the shared hosting customer have no say about it. If the newer version no longer has mysql extension enabled, the customers applications will stop working.

It does not matter whether you think MySQLi or PDO MySQL is better than mysql or not. What matters is that the customers applications will stop working until the customer spends more money hiring somebody to update their code to user those newer extensions.

It is just not a matter of moaning for the sake of moaning. It make people loose money to update code that will do anything new.

I am sorry to see so many people not being sensitive to the fact that others need to waste money just because some PHP core developers want to be pedantic about the PHP extensions that you should use or not.

When you have lots of code with mysql calls scattered all over it, it is not a small effort to make the changes and test them to assure they work well as before.