The Next Big Thing in Databases: Exploring Newcomers like FaunaDB and SurrealDB

As someone who’s been experimenting with both FaunaDB and SurrealDB in recent projects, I’ve had the chance to explore their strengths and weaknesses firsthand. These emerging databases bring fresh approaches to modern data handling, offering new possibilities for developers. While they’re not as established as PostgreSQL or MongoDB, they offer unique features that could give your applications a significant edge, depending on your use case.

faunaDB and surrealDB

FaunaDB: The Serverless Database for Modern Apps

faunaDB

FaunaDB is a serverless, distributed, globally consistent database designed for modern, scalable applications. My experience with FaunaDB has shown that its serverless architecture eliminates much of the operational overhead typically associated with databases. Here are a few practical benefits I’ve noticed:

  1. Serverless Simplicity: With FaunaDB, I didn’t have to manage any servers or worry about scaling. Everything is handled automatically by the platform, which was a huge time saver in my recent project where I needed global scalability with minimal infrastructure management.
  2. Global Consistency: Unlike some NoSQL databases that prioritize availability over consistency, FaunaDB’s global consistency ensures data integrity no matter where in the world users are accessing it. This made it ideal for my real-time collaboration tool that needed to keep data synchronized across different regions.

Practical Implementation: FaunaDB’s GraphQL API makes it easy to integrate into modern web and mobile applications. Here’s a simple example of a FaunaDB query using its GraphQL interface:

graphqlCopy codequery {
  findUserByID(id: "1234") {
    name
    email
  }
}

This query retrieves a user’s name and email by their ID, all without needing to manage the underlying infrastructure.

SurrealDB: Multi-Model Flexibility with SQL-Like Syntax

surrealDB

SurrealDB is another fascinating database I’ve been using, especially for projects that require flexibility in how data is modeled and queried. SurrealDB combines document, graph, and relational models in one system, giving you the freedom to choose the best approach for your specific needs.

  1. Multi-Model Flexibility: In one of my recent projects, SurrealDB’s ability to handle multiple data models in a single system significantly simplified my architecture. I was able to store user data as documents, but also create graph relationships for friend connections—all without switching between different databases.
  2. Real-Time Web Integration: SurrealDB’s built-in websocket support allowed me to implement real-time updates across clients seamlessly. This was perfect for building a dashboard that needed instant updates whenever the underlying data changed.

Practical Implementation: Here’s an example of querying SurrealDB using its SQL-like syntax to get user data and their connections in a graph model:

sqlCopy codeSELECT * FROM user WHERE id = "1234";
RELATE user->friend->user WHERE user.id = "1234";

This query fetches user data and creates a relationship between users as friends, all with a familiar SQL-like interface.

Comparing the Two: Practical Script Comparison

Here’s a side-by-side comparison of how you might implement similar functionality in both FaunaDB and SurrealDB. Let’s say you want to add a new user and create a relationship (like a “friend” connection) between two users.

FaunaDB Example:

graphqlCopy codemutation {
  createUser(data: { name: "Alice", email: "[email protected]" }) {
    id
    name
  }
}
mutation {
  createFriendship(data: { fromUser: { connect: "1234" }, toUser: { connect: "5678" } }) {
    fromUser {
      name
    }
    toUser {
      name
    }
  }
}

SurrealDB Example:

sqlCopy codeCREATE user SET name = "Alice", email = "[email protected]";
RELATE user->friend->user WHERE user.id = "1234" AND user.id = "5678";

In both examples, you’re creating a new user and establishing a relationship between two users. FaunaDB leverages GraphQL mutations, making it simple to integrate with GraphQL-based front-end applications, while SurrealDB uses a more SQL-like syntax, which can feel more familiar to developers used to relational databases.

Conclusion

FaunaDB and SurrealDB are promising options for developers looking to try something new. FaunaDB shines in serverless environments where scalability and global data consistency are crucial. On the other hand, SurrealDB offers unmatched flexibility with its multi-model capabilities and real-time data features, making it a powerful choice for complex, dynamic applications.

While these databases are still maturing compared to industry stalwarts like PostgreSQL or MongoDB, experimenting with them now can give your projects a forward-thinking advantage. If you’re building modern applications that require flexibility, real-time updates, or global scalability, FaunaDB and SurrealDB are definitely worth exploring.

Modern dev stacks now mix databases with AI — I wrote about the AI Tools for Programmers in 2025 that are already reshaping dev workflows: http://christechno.com/2025/10/06/🧠-ai-tools-for-programmers-in-2025-how-the-way-we-code-has-completely-changed/

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *