Introduction >> 

eZ db™

eZ db is a database abstraction library. It provides a uniform interface to MySQL and PostgreSQL.

The eZ db library provides a database independent framework for SQL databases. The current supported databases are:

  • PostgreSQL
  • MySQL

To make it easier to support the different databases we have defined a subset of SQL data types to use. The types used are:

  • int - integers, date and time as UNIX timestamp, enums and boolean
  • float - float and prices
  • varchar - short text strings (less than 255 characters)
  • text - large text objects like article contents

To store date and time values ints are used. eZ locale is used to present the date and times on a localized format. That way we don't have to worry about the different date and time formats used in the different databases.

Auto incrementing numbers, sequences, are used to generate unique ids for a table row. This functionality is abstracted as it works differently in the different databases.

Limit and offset functionality is also abstracted by the eZ db library.

eZ db is designed to use lowercase in all table/column names. This is done to prevent errors as the different databases handle this differently, especially when returning the data as an associative array.

Useful links

Dependencies

eZ db™ uses the following Exponential libraries.


Exponential