PDO4You is a class that implements the Singleton design pattern for connecting the database using the PDO extension (PHP Data Objects). It provides an abstraction layer for accessing data, regardless of which database you are using, and ensures that there is a single object instance per database connection. It can connect to several possible SQL databases using the available PDO drivers. Currently it supports MySQL, PostgreSQL, SQLite, MariaDB, Oracle, Microsoft SQL server, Sybase, and CUBRID (a database highly optimized for Web applications). The class can also execute multiple queries at once given a string in JSON format that specifies the type of query, the tables, fields, field values, conditions, etc.
lib4d_sql is a C library that provides the required functions (connect, prepare, execute, etc.) for writing an SQL client for 4D databases. It uses the public 4D SQL protocol, which is supported by 4D products since version 11. It is already used by the PDO_4D Open Source project, and it might be used to provide others drivers for JDBC, ADO, or ActiveRecord.