Coming from other databases

Overview and what carries over

A table of which database's clients, queries and data Raft DB can take over, which it cannot, and how to choose the way in.

Raft DB can replace another database in two different ways, and they are not equally easy:

  • Keep the client. Raft DB answers the wire protocol of the other database, so the driver, the tools and the SQL stay as they are and only the address changes. This works for MySQL, MariaDB, PostgreSQL and SQL Server, and for Neo4j (graph, still in development).
  • Move the application. Raft DB has no wire protocol for the database you use, so the application is changed to use Raft DB's own HTTP/JSON API or its connectors. This is the case for MongoDB and Redis, and for SQLite (which has no server to speak to).
You useWay inWhat you changeWhat does not carry over
MySQL, MariaDBThe MySQL protocol (raftdb-mysql, port 3306)Host, port, accountAnything on the list of what is not supported
PostgreSQLThe PostgreSQL protocol (raftdb-pg, port 5432)Host, port, accountExtensions, and the items on the PostgreSQL limits page
SQL ServerThe TDS protocol (raftdb-mssql, port 1433)Host, port, accountAnything on the SQL Server limits
Neo4jBolt and Cypher (in development)AddressDifferences on the graph limits page
MongoDBRaft DB's HTTP API or a connectorThe data-access codeThe Mongo wire protocol, update operators, aggregation pipeline
RedisRaft DB's HTTP API or a connectorThe data-access codeThe Redis protocol, data structures, expiry (TTL), publish and subscribe
SQLiteA MySQL or PostgreSQL driver, or the HTTP APIThe connection and the dialect differencesRunning inside the application's process

What Raft DB does not have, in one place#

So that nothing here is a surprise later:

  • No MongoDB wire protocol: a MongoDB driver cannot connect, mongosh cannot connect.
  • No Redis protocol: redis-cli and Redis client libraries cannot connect.
  • No key expiry (TTL) of any kind.
  • No aggregation pipeline, and no update operators ($set, $inc, ...): a document is read, changed by the caller and written back whole.
  • No Redis lists, sets, sorted sets, hashes as such, counters or publish and subscribe.
  • Isolation between SQL sessions is per table at the READ-COMMITTED level, not snapshot or repeatable read.
  • Pre-release software: a long production track record is not there yet.

The common first steps#

  1. Install Raft DB and start it (Installing).
  2. Make an account for the application (never reuse the administrator's).
  3. Move a copy of the data, not the original. Each page below says how.
  4. Run the application's own tests against it, and read the list of unsupported items for the dialect you use before moving anything real.
  5. Keep the old database until the new one has run your real workload.

Raft DB is independent software. It is not affiliated with, endorsed by or derived from any of the products named in this chapter; their names are used only to say which clients and formats it works with.