Upgrading to Elegant and Versatile Database Architecture Using PHP5 Data Objects

Architecture and Technology, Business and Case Studies, PHP and MySQL
Location: Ballroom D Level: Intermediate
Presentation: external link

Developers often hold off from using newer MySQL features to maintain compatibility with earlier versions, and over time your queries become old-school. How can you take advantage of newer MySQL syntax yet keep it backwards compatible?

During 2007 the community of developers around SilverStripe, a modern open source CMS, were faced with this problem and used the Google Summer of Code to solve it. Months were spent researching and re-architecting so that the tens of thousands of people downloading SilverStripe would discover it worked with various versions of MySQL, Postgres or MS SQL.

The session takes you through a technical case study, demonstrating PHP code and SQL statements, and giving advice on how to upgrade your website or application to be protected against the future as well as the past.

1. Why PHP5 Data Objects was chosen instead of ADOdb, ADOdb Lite, MDB / MDB2, Propel, Creole, and EZPDO.

2. Brief primer on PDO

3. How to overhaul your database core yet keep it sufficiently stable to roll out new features being downloaded thousands of times

4. Writing versatile SQL statements that aren’t ugly

5. Elegantly dealing with the various SQL syntaxes of different MySQL versions so you can take advantage of newer MySQL features, and fall back to less-elegant, slower queries for older versions

6. How to keep your SQL continuously up to date, and trimming off your old-school queries.

Photo of Sigurd Magnusson

Sigurd Magnusson


Sigurd has been living and breathing the internet since 1995 when the City Council of Wellington, New Zealand provided the region’s only internet service; then entirely text-based and only 2400 baud. Add a grandma who taught him C before he got to high school, and the rest all makes sense.

In 2000, he co-founded SilverStripe with two friends, which has since made hundreds of websites and web-applications. Sig’s focus is now on building up the community around their open source platform for building websites and webapps, SilverStripe CMS.

The SilverStripe open source project was launched in early 2007 and in a matter of months, Sigurd rapidly attracted community and credibility to the project. He got the project involved in the Google Summer of Code program (where Google paid for ten programmers to add features), solicited tens of thousands of downloads, and built up a loyal community of who have voted to rank SilverStripe a finalist in the global Open Source CMS awards, beating many years-established projects.

Aside from his beautiful partner and daughter, Siggy loves adventure: snowboarding, turning up in a foreign city, reading books in the sun, and being conned into dancing Salsa for the Cuba Street carnival.

  • Kickfire
  • Zmanda, Inc.
  • Continuent
  • EDS
  • JasperSoft
  • Sun Microsystems
  • Symantec Anti-Virus Software
  • XAware
  • Data Direct Technologies
  • Dolphin Interconnect Solutions
  • Hewlett Packard
  • Infobright, Inc
  • Linagora
  • Microsoft
  • OpSource
  • Oracle
  • Pentaho
  • R1Soft
  • Red Hat
  • Ticketmaster
  • TechRepublic

Contact Us

View a complete list of MySQL contacts.