Built on top of SQLite, DocLite is a robust NoSQL document store for PHP that offers a strong, quick, and ACID-compliant alternative to flat-file databases like SleekDB. It accesses a SQLite database using the PHP PDO SQLite library and manages documents automatically in named collections that are stored as JSON.
With the power and flexibility of a fully transactional and ACID-compliant NoSQL solution, but contained within the local file system, DocLite makes use of the SQLite JSON1 extension (which is typically included in the libsqlite supplied with your PHP distribution, so you presumably already have it). When your requirements are minimal, there is no need for more complicated systems like Mongo, CouchDB, or Elasticsearch. You only need PHP with PDO SQLite enabled; no other external dependencies are required.
You can learn, install, and use DocLite’s simple, logical, powerful, and versatile PHP library in only a few minutes.
Why use DocLite?
DocLite is well suited for a wide range of use cases, including but not limited to:
- Strong, independent NoSQL database for small- to medium-sized websites or apps, including blogs, company websites, CMS, CRM, or forums.
- a quick and dependable cache for data acquired from distant servers, APIs, or databases. You may quickly query and filter your data as needed after processing your data into documents and save them in DocLite.
- substitute for weaker, slower, flat-file data stores using JSON, XML, or YAML that is robust, effective, and ACID compliant.
- Application database for locally installed and executed web applications.
- Database for middleware and microservices.
- A quick in-memory database for machine learning or data processing techniques.
- In general, DocLite is appropriate for the same use cases as the underlying technology.
Broadly speaking, DocLite is ideal for the same use cases as the core SQLite engine it is built on, but when you desire a NoSQL solution.
- PHP 7.4 or above
- With PDO SQLite enabled, built against libsqlite ≥ 3.7.0 with JSON1 extension.
(on most systems, if you’re running PHP 7.4 you probably already meet the second requirement)
Click to reveal
Click to hide