SimpleDBM is an Open Source Transactional Database Engine in Java. It has a very small footprint and can be embedded in the address space of an application. It provides a simple programming API, which can be learned very quickly. A simple network API is available for remote access.
SimpleDBM has the following features:
- Transactional - SimpleDBM fully supports ACID transactions. SimpleDBM uses a STEAL/NO-FORCE buffer management strategy for transactions.
- Multi-threaded - SimpleDBM is multi-threaded and supports concurrent reads and writes of data.
- Write Ahead Log - SimpleDBM uses a write ahead log to ensure transaction recovery in the event of system crashes.
- Lock based concurrency - SimpleDBM uses shared, update and exclusive row locks to manage concurrency.
- Multiple Isolation Levels - SimpleDBM supports read-committed, repeatable-read, and serializable isolation levels.
- B-Tree Indexes - SimpleDBM implements B-plus Tree indexes, that fully support concurrent reads, inserts and deletes. SimpleDBM B-Trees continually re-balance themselves, and do not suffer from fragmentation.
- Tables - SimpleDBM supports tables, but for maximum flexibility, treats table rows as blobs of data. Table rows can have any internal structure as you like, and can span multiple disk pages. Standard table rows with multiple columns are supported via add-on modules.
- Latches and Locks - SimpleDBM uses latches for internal consistency, and locks for concurrency. Latches are more efficient locking mechanisms that do not suffer from deadlocks.
- Deadlock detection - SimpleDBM has support for deadlock detection. A background thread periodically checks the lock table for deadlocks and aborts transactions to resolve deadlocks.
- Network API - From release 1.0.18 a network client server implementation is included that allows SimpleDBM servers to run standalone and remote clients to connect via TCP/IP. Only Java bindings available right now.
- SimpleDBM does not suport SQL.
- There is no support for distributed transactions (XA) yet.
SimpleDBM is available via Maven Central. The latest release is 1.0.23. If you discover bugs please report as I will do my best to fix bugs. Enhancements are currently on hold due to lack of time.
- 1 Aug 2014 - SimpleDBM 1.0.23 uploaded to maven central. From this release the primary license is Apache V2.0 - but GPL and LGPL continue to be options.
- 22 May 2013 - SimpleDBM 1.0.22 uploaded to maven central
- 3 June 2012 - SimpleDBM 1.0.19-ALPHA released. This is a bug fix release.
- 19 April 2010 - SimpleDBM 1.0.18-ALPHA released. This contains a first implementation of the network client server.
SimpleDBM license has been changed to Apache License 2.0 from 1.0.23 onwards.
Getting Started with SimpleDBM
To start developing code with SimpleDBM, you need to include following maven dependencies:
This option is where you want the database engine to be inside your application, deployed as part of the same JVM.
<dependency> <groupId>org.simpledbm</groupId> <artifactId>simpledbm-common</artifactId> <version>1.0.23</version> </dependency> <dependency> <groupId>org.simpledbm</groupId> <artifactId>simpledbm-rss</artifactId> <version>1.0.23</version> </dependency> <dependency> <groupId>org.simpledbm</groupId> <artifactId>simpledbm-typesystem</artifactId> <version>1.0.23</version> </dependency> <dependency> <groupId>org.simpledbm</groupId> <artifactId>simpledbm-database</artifactId> <version>1.0.23</version> </dependency>
See the Database API documentation below.
The Network Server allows a client / server deployment. Instructions to follow...
For documentation, I recommend you start with:
- SimpleDBM Overview - provides an overview of SimpleDBM
- SimpleDBM Network API - describes the Network API for client/server implementation
- SimpleDBM Database API - describes the Database API for embedded use
- SimpleDBM TypeSystem - useful if you want to know more about the type system
For advanced stuff, read:
- SimpleDBM RSS User's Manual - describes the low level API of RSS
- SimpleDBM Developer's Guide - covers internals of RSS, the SimpleDBM database engine
- BTree Space Management (pdf) - describes some implementation issues with BTree space management
If you find bugs, please raise Issues. You can also post questions in the discussion group.