Icon

SQL Layer

Scalable. Fault-tolerant. SQL.

The SQL Layer is an ANSI SQL engine that stores its data in the Key-Value Store, inheriting its incredible properties. It is best suited for operational (OLTP) applications with high concurrency.

Exceptional fault tolerance

No more worrying about down time. The SQL Layer runs statelessly on every app server and stores all data in the Key-Value Store, inheriting its remarkable qualities.

Read more about the architecture →

Architecture

Horizontal scale at every level

The SQL Layer looks like a single SQL database to your application, but it's actually a stateless "layer" that translates and stores all data in the Key-Value Store. This architecture provides you with scalability and fault-tolerance at both your application and data tiers.

Read more about the architecture →

Scalability-layers

Revolutionary features

Designed for a distributed world, the SQL Layer supports such features as hierarchical modeling of relational tables that bridge the gap between SQL and objects, the ability to access data as JSON documents using nested SQL, deeply pipelined parallel execution of queries, and much more.

Read about all SQL Layer features →

Strong ORM integration

Whether you have an existing app or are building a new one, we want you to use whatever ORM you're comfortable with. ActiveRecord, Django, Hibernate, and many others are already supported.

See the full list of supported ORMs →

  • Ruby on Rails app
    # Gemfile
    gem 'pg'
    gem 'activerecord-fdbsql-adapter'
    
    # config/database.yml
    development:
      adapter: fdbsql
      host: localhost
      port: 15432
      database: sample_development
    Read the ActiveRecord docs →
  • Django app
    $ sudo pip install django-fdbsql
    
    DATABASES = {
      'default': {
        'ENGINE': 'django_fdbsql',
        'NAME':   'mysample',
        'HOST':   'localhost',
        'PORT':   '15432',
      }
    }
    Read the Django docs →
  • SQLAlchemy app
    $ sudo pip install sqlalchemy-foundationdb
    
    # app.py
    import sqlalchemy
    
    sqlalchemy.create_engine(
      "foundationdb+psycopg2://user@localhost:15432/"
    )
    Read the SQLAlchemy docs →
  • Java Hibernate
    # pom.xml
    <dependency>
      <groupId>com.foundationdb</groupId>
      <artifactId>fdb-sql-layer-hibernate</groupId>
    </dependency>
    
    # hibernate.properties
    hibernate.dialect=org.hibernate.dialect.FoundationDBSQLDialect
    hibernate.connection.driver_class=com.foundationdb.sql.jdbc.Driver
    hibernate.connection.url=jdbc:fdbsql://localhost:15432/sample
    Read the Hibernate docs →