v3.1 - Now with Spatial Queries

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.

~9KLines of Code
0Dependencies
O(1)Key Lookup

Everything you need, nothing you don't

Built for simplicity and performance

Blazing Fast

O(1) key lookups with JSONL byte-offset indexing. Static cache sharing across instances.

Auto-Sharding

Automatically splits large datasets into shards for optimal performance at scale.

Thread-Safe

Atomic file locking ensures safe concurrent access from multiple processes.

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.

Secure by Default

PBKDF2 hashed filenames. No external exposure of database structure.

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? No problem. Auto-sharding keeps performance consistent as your data grows.

Install in seconds

One command. That's all it takes.

Terminal
$ composer require orhanayd/nonedb

Requires PHP 7.4+ β€’ No extensions needed β€’ Works on any hosting

Start building in minutes

Simple, intuitive API that just works

// Initialize
$db = new noneDB();

// Create
$db->insert("users", [
    "name" => "John Doe",
    "email" => "john@example.com",
    "role" => "admin"
]);

// Read
$user = $db->query("users")
    ->where(["email" => "john@example.com"])
    ->first();

// Update
$db->query("users")
    ->where(["email" => "john@example.com"])
    ->update(["role" => "superadmin"]);

// Delete
$db->query("users")
    ->where(["email" => "john@example.com"])
    ->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 for more? Check out the full documentation.

Ready to simplify your stack?

Join developers who chose simplicity over complexity.