LWN.net Logo

Mayfly 0.2 released

From:  Jim Kingdon <kingdon-AT-panix.com>
To:  lwn-AT-lwn.net
Subject:  Mayfly 0.2 released
Date:  Fri, 25 Aug 2006 10:31:34 -0400 (EDT)

Mayfly 0.2, a SQL in-memory database for unit tests written in Java, is
now available for download at http://mayfly.sourceforge.net/ . There
is also documentation on-line there. 
 
A few of the features which are new in 0.2 are: 
 
* Schemas (and SET SCHEMA)

* GROUP BY

* Auto-increment columns

* Primary and foreign keys

Background: although there are a vast number of free and non-free SQL
implementations in Java, few of them are really good for unit
testing. A database for unit testing should be very fast on small data
sets and should not present performance or other obstacles to setting
up databases, adding and removing tables, and destroying databases. A
typical unit test run will want to create thousands of databases. With
most SQL databases, this is not achievable, and one must resort to
compromises such as keeping the tables around and only setting up data
on each unit test run. Mayfly aims to make creating an in-memory SQL
database as easy as creating any other in-memory data structure. 

As such, two of Mayfly's interesting features are:

* The ability to very cheaply snapshot the database (both metadata and
  data) and restore from that point.
* Your choice of JDBC or the Mayfly-specific Database class


(Log in to post comments)

Copyright © 2006, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds