Skytable

Skytable Logo Skytable Logo

Skytable is a modern NoSQL database designed to offer high performance, flexibility, and scalability. It is primarily an in-memory, wide-column based database with support for additional data models, powered by its own query language, BlueQL.

What is Skytable?

Skytable is best suited for applications needing to store large-scale data with high performance and low latency. It uses its own storage engine and enables querying through BlueQL, which builds on top of SQL to enhance security and flexibility.

Read more about Skytable's architecture, clustering, HA implementation, and limitations here.

Features

  • Spaces and Models: Provides flexible data definition.
  • Powerful Querying with BlueQL: A modern query language based on SQL.
  • Rich Data Modeling: Use models to define data with complex types and collections.
  • High Performance: Utilizes multithreading and optimized write batching.
  • Security: BlueQL is designed to deter query injection pathways.
  • Best Practices Enforcement: Learn performant system-building practices with Skytable.

Learn more about Skytable's features here.

Getting Started

  1. Set up Skytable: Download a release from the releases page. Unzip the files.
  2. Start the database server:
    ./skyd --auth-root-password <password>
    Replace <password> with your chosen password for the root account.
  3. Start the interactive client REPL:
    ./skysh
    Then enter your password.
  4. Run queries!

For detailed installation and deployment instructions, follow this guide.

Using Skytable

Skytable uses SPACEs instead of DATABASEs.

  1. Create a space and switch to it:
    CREATE SPACE myspace;
    USE myspace;
  2. Create a model:
    CREATE MODEL myspace.mymodel(username: string, password: string, notes: list { type: string });
  3. Insert data:
    INSERT INTO mymodel('sayan', 'pass123', []);
  4. Update data:
    UPDATE mymodel SET notes += "my first note" WHERE username = 'sayan';
  5. Select data:
    SELECT * FROM mymodel WHERE username = 'sayan';

Learn more about BlueQL and Skytable usage in the documentation.

Client Drivers

Skytable provides a Rust client driver for easy integration. Here's an example of using the Rust client driver:

use skytable::{Config, query};
 
fn main() {
    let mut db = Config::new_default("username", "password").connect().unwrap();
    let query = query!("select username, password from myspace.mymodel where username = ?", "sayan");
    let (username, password): (String, Vec<u8>) = db.query_parse(&query).unwrap();
    // Do something with the data
}

Find more information on client drivers here.

Similar Projects