Software:SurrealDB

From HandWiki
SurrealDB
SurrealDB
Developer(s)SurrealDB
Initial releaseDecember 8, 2019
Stable release
v1.1.1 / January 16, 2024
Repositorygithub.com/surrealdb/surrealdb
Written inRust
LicenseBusiness Source License, Apache License after 4 years
Websitesurrealdb.com

SurrealDB is an NewSQL[1] open-sourced multi-model database and database-as-a-service platform.[2] The platform is designed to offer a structured yet flexible way of storing and querying data, aiming to simplify the app development process by minimizing the need for building backend APIs and database layers.[3][4]

The database is written in Rust,[5] with SDKs supporting languages such as JavaScript, Python, .NET, and others.[6] The database supports a number of modalities, including graph, relational, document and vector database features.

History and development

The company was founded by brothers Tobie Morgan Hitchcock and Jaime Morgan Hitchcock.[7] In 2023 it raised a $6 million seed funding round led by FirstMark.[2][8] The company is based out of London.[9] Version 1.0 of the database was release in September 2023[10]

The company's fully managed database service was in beta as of early 2023, with plans for a commercial launch in 2024. Investor Matt Turck from FirstMark sees SurrealDB competing in the growing database-as-a-service market, projected to be worth $24.8 billion by 2025.[2]

Technical features

SurrealDB is a multi-model database that aims to address the requirements of contemporary application development. It provides a range of features intended to offer flexibility and functionality, positioning it as a potential option for developers seeking adaptable database solutions.[6]

Architecture

SurrealDB offers various configurations for its architecture.

  • Single-node (in-memory) for multi-reader, single-writer querying and data analysis.
  • Web browser with WebAssembly library for remote database connections or IndexedDB-based persistence in the browser.
  • Single-node (on-disk) using RocksDB or SpeeDB for persistent data storage.
  • Distributed clusters using FoundationDB or TiKV for high availability and scalability

Platform

  • Multi-tenancy data separation allows splitting data into namespaces and databases.
  • Multi-table, multi-row transactions for fully ACID-compliant operations.

Data model

  • Supports storage with and without schemas
  • Supports basic types like booleans,[11] strings,[12] and numerics (64-bit integers and floats, and 128-bit decimals).[13]
  • Empty values can be represented as NONE or NULL.[11]
  • Native support for arrays and objects with unlimited nesting depth.
  • Date-times in ISO-8601 format, converted and stored in UTC.
  • GeoJSON data types.
  • Futures and casting capabilities for computed and strongly typed values

SurrealQL

  • SQL-like query language with statements like SELECT, CREATE, UPDATE, DELETE, RELATE, and INSERT.
  • Features like FOR loops and THROW statements for custom error types.
  • Nested field queries, mathematical and geospatial operators.
  • Complex record IDs and record ID ranges for timeseries contexts

Additional features

  • Pre-defined aggregate analytics views for data analysis.
  • Live queries and record changes with web-based data syncing.
  • Global parameters for database-wide value accessibility.
  • Custom functions for complex, user-defined logic within queries
  • Database as a backend which enables client applications to remove the need for Backend APIs with scoped permissions and user authentication.

SurrealKV

SurrealKV, set for inclusion in SurrealDB's 1.X release, is being developed as a native Rust-based key–value storage engine for both single-node and distributed systems. It aims to enable multiple concurrent writers and readers, with a focus on immutable data querying, versioned queries, data change auditing, and historic analysis. The distributed version will additionally offer scalability to handle terabytes of data and enhanced fault tolerance for enterprise-level applications[6]

References

  1. Peyton, Antony (2022-07-21). "Tech Startup SurrealDB Goes Live with Serverless Cloud Database" (in en-US). https://www.eweekuk.com/database/tech-startup-surrealdb-goes-live-with-serverless-cloud-database/. 
  2. 2.0 2.1 2.2 Wiggers, Kyle (2023-01-04). "SurrealDB raises $6M for its database-as-a-service offering" (in en-US). https://techcrunch.com/2023/01/04/surrealdb-raises-6m-startup-funding-database-as-a-service/. 
  3. "SurrealDB launch marks monumental milestone in the world of data management" (in en-GB). 2023-09-15. https://uktechnews.co.uk/2023/09/15/surrealdb-launch-marks-monumental-milestone-in-the-world-of-data-management/. 
  4. Wood, Anna. "London’s tech scene gets a reboot" (in en). http://startupsmagazine.co.uk/article-londons-tech-scene-gets-reboot. 
  5. "SurrealDB: Open source scalable graph database has big potential" (in en-US). 2022-08-23. https://devm.io/databases/surrealdb-graph-database-beta. 
  6. 6.0 6.1 6.2 "SurrealDB | Features | The ultimate multi-model database" (in en). https://surrealdb.com/features. 
  7. Peyton, Antony (2021-09-29). "SurrealDB Keeps it Real with Serverless Cloud Database Launch" (in en-US). https://www.eweekuk.com/applications/surrealdb-keeps-it-real-with-serverless-cloud-database-launch/. 
  8. "SurrealDB | We are thrilled to announce our $6M Seed round led by FirstMark Capital and Matt Turck!" (in en). https://surrealdb.com/blog/we-are-thrilled-to-announce-our-6m-seed-round-led-by-firstmark-capital-and-matt-turck. 
  9. Maguire, Chris (2023-07-25). "Huckletree to open two new London hubs" (in en). https://businesscloud.co.uk/news/huckletree-to-open-two-new-london-hubs/. 
  10. "SurrealDB | Releases | The ultimate multi-model database" (in en). https://surrealdb.com/releases. 
  11. 11.0 11.1 "Basic types | SurrealDB Docs" (in en). https://surrealdb.com/docs/surrealql/datamodel/simple. 
  12. "Strings | SurrealDB Docs" (in en). https://surrealdb.com/docs/surrealql/datamodel/strings. 
  13. "Numbers | SurrealDB Docs" (in en). https://surrealdb.com/docs/surrealql/datamodel/numbers.