Database Integration

Secure connections with zero configuration

Secure connections to PostgreSQL, MySQL, MongoDB and more with zero configuration. Database integration made simple.

Supported Databases

Connect to popular databases with built-in support:

🐘PostgreSQL

  • • Full SQL support
  • • JSON data types
  • • Advanced indexing
  • • ACID compliance

🐬MySQL

  • • High performance
  • • Replication support
  • • Full-text search
  • • Stored procedures

🍃MongoDB

  • • Document storage
  • • Flexible schema
  • • Aggregation pipeline
  • • Horizontal scaling

🔺Redis

  • • In-memory storage
  • • Caching layer
  • • Pub/Sub messaging
  • • Session storage

Zero Configuration Setup

Connect to databases without complex configuration:

  1. Add Database: Select your database type from the dashboard
  2. Connection String: Provide your database connection details
  3. Environment Variables: Automatically configured for your functions
  4. SSL/TLS: Secure connections enabled by default
  5. Connection Pooling: Optimized connection management

Environment Variables

Database connections are automatically available as environment variables:

Automatic Environment Variables

DATABASE_URL:postgresql://user:pass@host:5432/db
DB_HOST:your-db-host.com
DB_PORT:5432
DB_NAME:your_database

Connection Examples

Here are examples of connecting to different databases:

Node.js + PostgreSQL

import { Pool } from 'pg';

const pool = new Pool({
  connectionString: process.env.DATABASE_URL
});

export default async function handler(req, res) {
  const result = await pool.query(
    'SELECT * FROM users WHERE id = $1',
    [req.query.id]
  );
  res.json(result.rows);
}

Python + MongoDB

from pymongo import MongoClient
import os

client = MongoClient(os.environ['DATABASE_URL'])
db = client['your_database']

def handler(event, context):
    users = db.users.find({})
    return {
        'statusCode': 200,
        'body': list(users)
    }

Security Features

Built-in security features for database connections:

"The database integration is incredibly secure. We can connect to our existing PostgreSQL cluster without exposing credentials, and the automatic SSL configuration gives us peace of mind."
— DevOps Engineer at SecureCorp
Security FeatureDescriptionStatus
SSL/TLS EncryptionEncrypted connections by defaultEnabled
Credential EncryptionEncrypted storage of credentialsEnabled
Connection PoolingOptimized connection managementEnabled
IP WhitelistingRestrict access by IP addressOptional

Database Management

Manage your databases from the Parslinks dashboard:

  • Connection Testing: Verify database connectivity
  • Schema Management: View and manage database schemas
  • Query Builder: Execute SQL queries directly
  • Backup & Restore: Automated backup scheduling
  • Performance Monitoring: Track query performance

Migration Support

Handle database migrations with built-in tools:

🔄
Schema Migrations
Version-controlled database changes
📊
Data Seeding
Populate databases with initial data
🔍
Rollback Support
Revert changes if needed

Getting Started

Connect your first database in minutes:

  1. Go to your project dashboard
  2. Navigate to the "Databases" section
  3. Click "Add Database"
  4. Select your database type
  5. Enter your connection details
  6. Test the connection
  7. Use environment variables in your functions

Best Practices

  • • Use connection pooling for better performance
  • • Enable SSL/TLS for all database connections
  • • Use environment variables for connection strings
  • • Implement proper error handling for database operations
  • • Monitor query performance and optimize as needed
Database Integration | Parslinks Documentation