Overview
SurrealDB is a next-generation multi-model database designed for modern applications. Key characteristics include:
- Multi-model architecture: Combines document, graph, and relational data models in one database
- SurrealQL: Powerful query language with SQL-like syntax plus graph traversal capabilities
- Real-time subscriptions: Built-in support for live queries and real-time data updates
- Schemaless or schemafull: Flexible schema options to suit your application needs
- Built-in authentication: Row-level security and authentication built into the database
- Namespace isolation: Multi-tenancy support with namespace and database hierarchies
SurrealDB is ideal for applications requiring flexible data modeling, real-time features, and simplified backend architecture.
Connecting
To connect to SurrealDB in DBCode, you’ll need:
- Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
- Add a New Connection: Click on the “Add Connection” icon.
- Complete connection form: Select SurrealDB as the database type and enter:
- Host/Server address
- Port (default: 8000)
- Protocol (WebSocket or HTTP)
- Namespace
- Database
- Username and Password (if authentication is enabled)
- Connect: Click save to connect to your SurrealDB instance.
- Start Managing Your Data: Browse tables and run SurrealQL queries.
For detailed instructions on connecting to databases, refer to the Connect article.
SurrealDB Features in DBCode
DBCode enhances your SurrealDB development experience with:
- SurrealQL query editor: Write and execute queries with syntax highlighting
- Namespace/Database browsing: Navigate through namespaces, databases, and tables
- Document editing: View and edit documents directly in the data grid
- Schema inspection: View table definitions and field types
- Query results visualization: View and export query results
By using SurrealDB with DBCode, you can efficiently explore your data, develop queries, and manage documents directly within Visual Studio Code.
For more information about SurrealDB, check out SurrealDB.