a firstworks project
SQL Relay
About Documentation FAQ Download Licensing Support News


SQL Relay 2.0.1

Featuring...

Updated platform, language, and database support
Automatic deadlock resolution, split-multi-insert, and upsert modules
Simplified authentication

Presenting SQL Relay - the database proxy and database connection management solution.

SQL Relay provides...


Persistent Database Connection Pooling
Improve performance and responsiveness of database-driven web-based applications.

Without SQL Relay:

With SQL Relay:

Throttling
Limit the number of connections to a given database and queue clients rather than denying them access.

Load Balancing, Failover, and High Availability
Distribute database traffic over clustered or replicated databases for scalability and failover.


Query and Session Routing
Route DML to masters and distribute selects over slaves.
Route sessions by user, database, client ip and more.

Data Translation
Translate queries, result sets, and errors.

Triggers
Trigger on DML or non-DML queries.
Perform database or os-level tasks.


Enhanced Database Security
Secure your database with TLS and Kerberos auth on front and
back ends, IP filtering, Connection Schedules, and Query Filtering.


Notifications
Receive notifications when various events occur.


Front-End Compatiblity
SQL Relay speaks MySQL, PostgreSQL, and its own
SQLRClient front-end protocols.

  • MySQL
  • PostgreSQL
  • SQLRClient

Back-End Compatiblity
SQL Relay supports most popular commercial and open-source
database back-ends.

  • Oracle
  • MS SQL Server
  • SAP/Sybase
  • IBM DB2
  • MySQL
  • PostgreSQL
  • Firebird
  • SQLite
  • ODBC

Platform Compatibility
SQL Relay supports Linux, Unix, and Windows platforms, independent of
architecture and provides database access from platforms unsupported by
the database vendor.

  • Linux
  • FreeBSD
  • NetBSD
  • OpenBSD
  • Windows
  • x86-64
  • ARM
  • MIPS
  • PowerPC

Database Abstraction Layers
SQL Relay provides drivers for several popular database abstraction layers.

  • PHP PDO
  • Perl DBI
  • Python DB
  • ODBC



Native APIs
Develop new applications with clean and powerful native APIs for most popular programming languages.

  • C
  • C++
  • C#
  • Perl
  • Python
  • PHP
  • Ruby
  • Java
  • TCL
  • Erlang
  • node.js
#!/usr/bin/perl

use SQLRelay::Connection;
use SQLRelay::Cursor;

$sqlrcon=SQLRelay::Connection->new("examplehost",9000,
                                        "/tmp/example.socket",
                                        "exampleuser",
                                        "examplepassword",0,1);
$sqlrcur=SQLRelay::Cursor->new($sqlrcon);

$sqlrcur->sendQuery("select * from exampletable");
for ($row=0$row<$sqlrcur->rowCount(); $row++) {
        for ($col=0$col<$sqlrcur->colCount(); $col++) {
                print($sqlrcur->getField($row,$col).",");
        }
        print("\n");
}


But that's just an overview. See the official documentation for much more information, including comprehensive howto's, guides and references.

Copyright 2024 - David Muse - Contact