Skip to content

Aerospike Database Management in VS Code

Aerospike is a distributed NoSQL database designed for applications that need high throughput, low latency, and high availability at scale. Key characteristics include:

  • Key-value and document storage: Data is organized into namespaces (databases), sets (tables), and bins (columns)
  • Sub-millisecond latency: Optimized for flash/SSD storage with predictable performance
  • SQL support: Query data using SQL syntax through the JDBC driver
  • Secondary indexes: Create indexes on bins for filtered queries
  • Horizontal scaling: Automatic data distribution and rebalancing across cluster nodes
  • Schema flexibility: Bins are dynamic per record, no predefined schema required

Aerospike is used in ad tech, financial services, gaming, telecommunications, and other industries requiring real-time data processing at scale.

To connect to Aerospike in DBCode, you’ll need:

  1. Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
  2. Add a New Connection: Click on the “Add Connection” icon.
  3. Complete connection form: Select Aerospike as the database type and enter:
    • Host/Server address
    • Port (default: 3000)
    • Namespace (the Aerospike namespace to connect to)
    • Username and password (if authentication is enabled)
    • Enable SSL/TLS if required
  4. Connect: Click save to connect to your Aerospike cluster.
  5. Start Managing Your Data: Browse sets and run SQL queries.

For detailed instructions on connecting to databases, refer to the Connect article.

DBCode enhances your Aerospike development experience with:

  • SQL query editor: Write and execute SQL queries (SELECT, INSERT, UPDATE, DELETE) with syntax highlighting
  • Set browsing: Navigate through sets (tables) and their bin (column) structure
  • Data grid: View, sort, and filter records with full data grid support
  • Secondary index management: View and create secondary indexes via SQL
  • Data export: Export query results in multiple formats
  • Namespace discovery: The connection form fetches available namespaces from the cluster

The Aerospike JDBC driver translates SQL into native Aerospike operations:

  • SELECT ... FROM set_name [WHERE ...] [LIMIT ...]
  • INSERT INTO set_name (__key, bin1, bin2) VALUES ('key', val1, val2)
  • UPDATE set_name SET bin1 = val1 WHERE __key = 'key'
  • DELETE FROM set_name WHERE __key = 'key'
  • TRUNCATE TABLE set_name
  • CREATE INDEX idx_name ON set_name (bin_name)
  • DROP INDEX set_name.idx_name

The __key column is the record’s primary key. Use it in INSERT statements to set the key, and in WHERE clauses for lookups.

Note: JOIN, GROUP BY, and subqueries are not supported by the Aerospike JDBC driver.

By using Aerospike with DBCode, you can efficiently browse your data, develop SQL queries, and manage records directly within Visual Studio Code.

For more information about Aerospike, check out Aerospike.