v4.0 - Crash-safe writes, backups & a verified storage format

The Zero-Dependency
Database for PHP

Not every project needs a database server.
For small to mid-scale applications, noneDB delivers the performance you need
without the infrastructure overhead.

1File to Include
0Dependencies
0.05 msKey Lookup

Everything you need, nothing you don't

Built for simplicity and performance

Fast by Design

Key-index checkpoints and paged field indexes: a lookup reads only the pages it needs. Indexes stay cached within a memory limit you set.

Scales to Millions

Automatic sharding (10,000 records per shard by default) and bounded memory: 10 million records answer queries in a 512 MiB process.

Crash-Safe

Locks across processes, failed writes rolled back, and a killed process loses no acknowledged write. Durable mode survives a power loss (Linux); backups are consistent.

Spatial Queries

GeoJSON support with R-tree indexing. Find nearby locations in milliseconds.

Query Builder

Fluent interface with MongoDB-style operators. Chain methods for complex queries.

Keys and Permissions

Only the keys registered for a store open it; directory names are HMACs of the names. Files are 0640. Data is not encrypted: keep the directory outside the web root.

Built for real-world projects

When you need a database, not an infrastructure

πŸš€

MVPs & Prototypes

Ship faster without database setup

πŸ”§

Internal Tools

Admin panels, dashboards, utilities

πŸ“

Content & Blogs

Articles, pages, simple CMS

βš™οΈ

Config & Settings

App configuration, user preferences

πŸ“Š

Analytics & Logs

Event tracking, activity logs

πŸ—ΊοΈ

Location Apps

Store locators, geo-based features

10K+ records? Auto-sharding keeps the files small, and a key lookup takes about 0.05 ms from 1,000 to 100,000 records.

Install in seconds

One command. That's all it takes.

Terminal
$ composer require orhanayd/nonedb

Requires PHP 8.1+ (64-bit) β€’ No extra extensions β€’ Local file system

Start building in minutes

Simple, intuitive API that just works

// Initialize (reads the .nonedb config file)
$db = new noneDB();

// Create
$db->insert("users", [
    "name" => "John Doe",
    "email" => "[email protected]",
    "role" => "admin"
]);

// Read
$user = $db->query("users")
    ->where(["email" => "[email protected]"])
    ->first();

// Update
$db->query("users")
    ->where(["email" => "[email protected]"])
    ->update(["role" => "superadmin"]);

// Delete
$db->query("users")
    ->where(["email" => "[email protected]"])
    ->delete();
// Fluent query builder
$users = $db->query("users")
    ->where(["role" => "admin"])
    ->where(["age" => ['$gte' => 18]])
    ->sort("created_at", "desc")
    ->limit(10)
    ->get();

// Aggregations
$avg = $db->query("orders")
    ->where(["status" => "completed"])
    ->avg("total");

// Search
$results = $db->query("posts")
    ->search("PHP database", ["title", "content"])
    ->get();
// Create spatial index
$db->createSpatialIndex("places", "location");

// Insert GeoJSON data
$db->insert("places", [
    "name" => "Coffee Shop",
    "location" => [
        "type" => "Point",
        "coordinates" => [28.9784, 41.0082]
    ]
]);

// Find places within 5km
$nearby = $db->query("places")
    ->withinDistance("location", 28.9784, 41.0082, 5000)
    ->withDistance("location", 28.9784, 41.0082)
    ->sort("_distance", "asc")
    ->get();

Ready to simplify your stack?

Join developers who chose simplicity over complexity.