Skip to main content

Database Connectors Overview

DreamFactory auto-generates secure REST APIs from your existing databases. Connect any supported database and instantly get full CRUD endpoints, schema management, stored procedure access, and interactive API documentation.


Supported Databases​

DreamFactory supports a wide range of SQL and NoSQL databases. Some connectors are included in the open-source package, while others require a commercial license.

Open Source (Included)​

These database connectors are included in DreamFactory OSS and all commercial editions:

DatabaseDriverDefault PortDocumentation
PostgreSQLpdo_pgsql5432PostgreSQL Guide
MySQL / MariaDBpdo_mysql3306MySQL Guide
SQLitepdo_sqliteN/A (file)SQLite Guide
Google AlloyDBpdo_pgsql5432AlloyDB Guide
Google BigQuerynone (HTTP API)N/A (cloud)BigQuery Guide

Commercial License Required​

These database connectors require a DreamFactory commercial license (Gold or Platinum editions):

DatabaseDriverDefault PortNotes
Microsoft SQL Serverpdo_sqlsrv1433SQL Server Guide
Oracle Databasepdo_oci1521Oracle Instant Client required
IBM DB2pdo_ibm50000IBM Data Server Driver required
IBM Informixpdo_informix9088Informix Client SDK required
SAP SQL Anywherepdo_sqlanywhere2638SQL Anywhere client required
Firebirdpdo_firebird3050Firebird client library required
Licensing

For commercial database connector licensing, contact DreamFactory Sales or visit the pricing page.


Common Features Across All Databases​

Regardless of which database you connect, DreamFactory provides:

Auto-Generated REST Endpoints​

  • Tables: GET/POST/PUT/PATCH/DELETE on /_table/{table_name}
  • Schema: GET/POST/PUT/DELETE on /_schema for schema management
  • Stored Procedures: GET/POST on /_proc/{procedure_name}
  • Stored Functions: GET/POST on /_func/{function_name}

Query Capabilities​

  • Filtering: Use SQL-style filters via query parameters
  • Sorting: Order results by any column(s)
  • Pagination: Limit and offset for large result sets
  • Field Selection: Return only specified columns
  • Related Data: Include related records via joins

Security Features​

  • API Key Authentication: Required for all endpoint access
  • Role-Based Access Control: Table, column, and verb-level permissions
  • Record-Level Filtering: Restrict data visibility per user/role
  • Rate Limiting: Configurable throttling per user, role, or endpoint
  • Audit Logging: Track all API requests

Choosing the Right Database Connector​

By Use Case​

Use CaseRecommended Database
New projects, cloud-native appsPostgreSQL, AlloyDB
Microsoft ecosystem integrationSQL Server
Embedded/local applicationsSQLite
Legacy enterprise systemsOracle, DB2, Informix
High-performance analyticsPostgreSQL, AlloyDB

By Cloud Provider​

Cloud ProviderNative Database ServiceDreamFactory Connector
AWSRDS PostgreSQL, RDS MySQL, RDS SQL ServerPostgreSQL, MySQL, SQL Server
Google CloudCloud SQL, AlloyDBPostgreSQL, MySQL, AlloyDB
Microsoft AzureAzure SQL, Azure PostgreSQLSQL Server, PostgreSQL
Self-hostedAny supported databaseFull compatibility

Connection Architecture​

DreamFactory connects to your databases using standard database drivers:

┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│ API Client │────▶│ DreamFactory │────▶│ Database │
│ (App/Service) │◀────│ (REST API) │◀────│ Server │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │ │
HTTP/HTTPS PDO Driver Native Protocol
+ API Key (pdo_pgsql, (PostgreSQL,
+ JWT (optional) pdo_mysql, etc.) MySQL, etc.)

Key Architectural Points​

  1. DreamFactory acts as a secure proxy - Your database is never directly exposed
  2. Connection credentials are stored encrypted - Never transmitted to API clients
  3. Single connection pool - Efficient database resource utilization
  4. Caching layer - Optional response caching for improved performance

Driver Installation​

DreamFactory Cloud includes all drivers pre-installed. For self-managed installations:

PHP PDO Extensions Required​

DatabasePHP ExtensionInstallation (Ubuntu/Debian)
PostgreSQLpdo_pgsqlapt-get install php-pgsql
MySQLpdo_mysqlapt-get install php-mysql
SQLitepdo_sqliteapt-get install php-sqlite3
SQL Serverpdo_sqlsrvSee SQL Server driver docs
Oraclepdo_ociRequires Oracle Instant Client

For complete installation instructions, see Installing Additional Drivers.


Performance Optimization​

Connection Pooling​

DreamFactory maintains persistent database connections. Configure pool size based on expected concurrent API requests.

Caching​

Enable caching for read-heavy workloads:

  • Per-service caching: Configure in service settings
  • Cache TTL: Set appropriate expiration times
  • Cache backends: Redis, Memcached, or local file cache

Query Optimization​

  • Use field selection to return only needed columns
  • Apply filters server-side rather than client-side
  • Use pagination for large datasets
  • Consider database views for complex, frequently-used queries

Security Best Practices​

Database User Permissions​

Create dedicated database users for DreamFactory with minimal required permissions:

-- PostgreSQL example: read-only user
CREATE USER dreamfactory_ro WITH PASSWORD 'secure_password';
GRANT CONNECT ON DATABASE myapp TO dreamfactory_ro;
GRANT USAGE ON SCHEMA public TO dreamfactory_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO dreamfactory_ro;

Network Security​

  • Use private networks/VPCs when possible
  • Enable SSL/TLS for database connections
  • Restrict database access to DreamFactory IP addresses
  • Never expose databases directly to the internet

DreamFactory RBAC​

Layer DreamFactory's RBAC on top of database permissions:

  • Create roles with minimum required access
  • Use record-level filters for multi-tenant applications
  • Separate API keys for different applications/environments

Next Steps​

For database-specific questions, consult the individual database guides or contact DreamFactory support.