PHPackages                             mthenw/nosqlite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. mthenw/nosqlite

ActiveLibrary[Database &amp; ORM](/categories/database)

mthenw/nosqlite
===============

Simple key =&gt; value store based on SQLite3

v0.3.0(12y ago)492.2k8[1 PRs](https://github.com/mthenw/nosqlite.php/pulls)MITPHPPHP &gt;=5.3.2

Since Feb 9Pushed 7y ago4 watchersCompare

[ Source](https://github.com/mthenw/nosqlite.php)[ Packagist](https://packagist.org/packages/mthenw/nosqlite)[ Docs](https://github.com/mthenw/nosqlite.php)[ RSS](/packages/mthenw-nosqlite/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

NoSQLite – simple key =&gt; value store based on SQLite3
========================================================

[](#nosqlite--simple-key--value-store-based-on-sqlite3)

[![Build Status](https://camo.githubusercontent.com/3276285b5e2427f804046870e69e3058f5dcae91d96f39612ee5837078f6fe90/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6d7468656e772f6e6f73716c6974652e7068702e706e67)](https://travis-ci.org/mthenw/nosqlite.php)[![Coverage Status](https://camo.githubusercontent.com/09e95b7362b8cd67f549031774d6e124baa08a05cacc1cf663d6d752cf53eedb/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6d7468656e772f6e6f73716c6974652e7068702f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/mthenw/nosqlite.php?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/f59cc3cf1c2d092616aaf1c340919f57c0dfd30ce6d31890684375cae1c941b0/68747470733a2f2f706f7365722e707567782e6f72672f6d7468656e772f6e6f73716c6974652f762f737461626c652e706e67)](https://packagist.org/packages/mthenw/nosqlite)

Introduction
------------

[](#introduction)

NoSQLite is simple key-value store using SQLite as raw data store. Mainly for small project where MySQL is too heavy and files are too ugly.

Requirements
------------

[](#requirements)

- PHP &gt;=5.3.2
    - PDO (by default as of PHP 5.1.0)
    - PDO\_SQLITE (by default as of PHP 5.1.0)

Installing via Composer
-----------------------

[](#installing-via-composer)

[Get composer](http://getcomposer.org/download/) and add following lines to `composer.json`:

```
{
    "require": {
        "mthenw/nosqlite": "*@stable"
    }
}

```

Usage
-----

[](#usage)

1. Create stores' manager (file will be created if not exists)

    ```
     $nsql = new NoSQLite\NoSQLite('mydb.sqlite');

    ```
2. Get store

    ```
     $store = $nsql->getStore('movies');

    ```
3. Set value in store (key and value max length are [limited by SQLite TEXT datatype](http://sqlite.org/limits.html#max_length))

    ```
     $store->set(uniqid(), json_encode(array('title' => 'Good Will Hunting', 'director' => 'Gus Van Sant')));

    ```
4. Get value from store (will be created if not exists)

    ```
     $store->get('3452345');

    ```
5. Get all values

    ```
    $store->getAll();

    ```
6. Delete all values

    ```
     $store->deleteAll();

    ```
7. Iterate through store (Store implements Iterator interface)

    ```
     foreach($store as $key => $value)
         ...

    ```
8. Get number of values in store (Store implements Countable interface)

    ```
     count($store);

    ```

Tests
-----

[](#tests)

Tests are written in PHPUnit which is required as a dev package in `composer.json`. For running test use

```
./vendor/bin/phpunit

```

or simply

```
make test

```

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~198 days

Total

4

Last Release

4607d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ed7076b6eaa8871fe8daa1a6f24e20b6f39f0204860ebc843e9673bdb6fe52b9?d=identicon)[mthenw](/maintainers/mthenw)

---

Top Contributors

[![mthenw](https://avatars.githubusercontent.com/u/455261?v=4)](https://github.com/mthenw "mthenw (63 commits)")[![smasty](https://avatars.githubusercontent.com/u/218524?v=4)](https://github.com/smasty "smasty (2 commits)")[![valeriangalliat](https://avatars.githubusercontent.com/u/3929133?v=4)](https://github.com/valeriangalliat "valeriangalliat (2 commits)")[![jasir](https://avatars.githubusercontent.com/u/115066?v=4)](https://github.com/jasir "jasir (1 commits)")[![petrozavodsky](https://avatars.githubusercontent.com/u/2689829?v=4)](https://github.com/petrozavodsky "petrozavodsky (1 commits)")

---

Tags

persistencedatabasesqlite3

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/mthenw-nosqlite/health.svg)

```
[![Health](https://phpackages.com/badges/mthenw-nosqlite/health.svg)](https://phpackages.com/packages/mthenw-nosqlite)
```

###  Alternatives

[doctrine/doctrine-bundle

Symfony DoctrineBundle

4.8k241.3M3.3k](/packages/doctrine-doctrine-bundle)[mongodb/mongodb

MongoDB driver library

1.6k64.0M542](/packages/mongodb-mongodb)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8481.6M87](/packages/propel-propel1)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[doctrine/phpcr-bundle

Symfony DoctrinePHPCRBundle

1602.6M41](/packages/doctrine-phpcr-bundle)[ezsql/ezsql

Advance database access library. Make interacting with a database ridiculously easy. An universal interchangeable CRUD system.

86946.7k](/packages/ezsql-ezsql)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
