PitchHut logo
An ACID database for arrays
Pitch

Numstore is a from the ground up database engine designed specifically for arrays. It allows for creating and deleting variables and modifying arrays. It's novel algorithms make inner mutations O(log n) rather than O(n) of a traditional flat file

Description

Key Features

Numstore offers a variety of functionalities, ensuring that users can perform critical operations with ease:

  • Create: Establish a new variable within the database.
  • Delete: Remove a specified variable.
  • Get: Retrieve an existing variable.
  • Insert: Add data into a variable.
  • Read: Access data from a variable.
  • Write: Modify data within a variable.
  • Remove: Eliminate specific data from a variable.
  • Transaction Management: Start, commit, or roll back transactions for enhanced data integrity.
  • Database Operations: Close and reopen a database as needed.

Sample Usage

Utilizing Numstore for basic operations is straightforward. The following code snippet demonstrates how to work with a Numstore database:

import numpy as np
import pynumstore as ns

# Basic Operations
with ns.open("mydb") as db:
    # Create or get a variable
    y = db.get_or_create("y", dtype="f32")

    # Initialize dataset
    del y[0:]
    print("Initial State: ", y[0:])

    # Append data
    y.append(np.array([1.0, 2.0, 3.0], dtype=np.float32))
    y.append(np.array([4.0, 5.0, 6.0], dtype=np.float32))
    print("Seed Data: ", y[0:])

    # Insert data
    y.insert(2, np.array([4.0, 5.0, 6.0], dtype=np.float32))
    print("After inner insert: ", y[0:])

    # Modify entries
    y[1:4] = np.array([9.0, 9.0, 9.0], dtype=np.float32)
    print("After overwrite 1: ", y[0:])

    # Remove even indices
    del y[0::2]
    print("End state: ", y[0:])

Why Choose Numstore?

By leveraging Numstore, developers gain access to a flexible and efficient database engine, specifically crafted to optimize operations on arrays. With robust transaction support and an intuitive interface, Numstore enables quick development cycles and ensures data integrity.

For those interested in exploring further, additional sample applications are available in the repository, along with comprehensive documentation to assist in the onboarding process.

0 comments

No comments yet.

Sign in to be the first to comment.