Quick Start
Building applications with YugabyteDB is straightforward. Choose your preferred programming language and get started in minutes.Prerequisites
Before you begin:- YugabyteDB cluster: Set up a local cluster or create a free cluster on YugabyteDB Aeon
- Programming language: Install your preferred language runtime (Java, Python, Node.js, etc.)
- Driver: Install the appropriate database driver for your language
Choose Your Language
YugabyteDB supports drivers and ORMs for all major programming languages:Java
PostgreSQL JDBC driver and YugabyteDB Smart Driver
Python
Psycopg2, Psycopg3, and SQLAlchemy support
Node.js
node-postgres driver with full async/await support
Go
pgx and GORM for efficient Go applications
C#
Npgsql driver and Entity Framework support
Ruby
pg gem and Active Record ORM
Basic Application Pattern
Here’s the typical workflow for building a YugabyteDB application:1. Connect to the Database
Establish a connection using your driver with connection parameters.2. Create Tables
Define your schema using standard SQL DDL statements.3. Insert Data
Add records to your tables using INSERT statements.4. Query Data
Retrieve data using SELECT statements.5. Update and Delete
Modify existing data as needed.Connection String Format
YugabyteDB uses PostgreSQL-compatible connection strings for YSQL:hostname: YugabyteDB server address (default: localhost)port: YSQL port (default: 5433)database: Database name (default: yugabyte)user: Username (default: yugabyte)password: User password (default: yugabyte)
SSL/TLS Connections
For secure connections, especially in production:Application Best Practices
Use Connection Pooling
Use Connection Pooling
Connection pooling reduces overhead and improves performance by reusing database connections.Recommended poolers:
- Java: HikariCP
- Python: SQLAlchemy pooling
- Node.js: pg-pool
- Built-in: YSQL Connection Manager
Handle Retries and Errors
Handle Retries and Errors
Implement retry logic for transient errors in distributed systems:
- Connection timeouts
- Temporary network failures
- Transaction conflicts
Use Prepared Statements
Use Prepared Statements
Prepared statements provide:
- Protection against SQL injection
- Better query performance
- Efficient parameterized queries
Optimize for Distributed Architecture
Optimize for Distributed Architecture
- Use primary keys wisely for data distribution
- Leverage indexes for query performance
- Consider data locality for multi-region deployments
Sample Applications
YugabyteDB provides sample applications in multiple languages:- Java: JDBC examples with YugabyteDB
- Python: Flask and Django applications
- Node.js: Express.js REST APIs
- Go: Microservices with pgx
View Sample Apps
Explore complete sample applications on GitHub
Next Steps
Drivers & ORMs
Learn about supported drivers and ORMs
YSQL API
Explore the YSQL API reference
Best Practices
Follow development best practices
Tutorials
Step-by-step application tutorials

