NeoDatis ODB
Developer(s) | NeoDatis Team |
---|---|
Stable release | 1.9 / May 14, 2009 |
Development status | Under development |
Written in | C#, Java |
Operating system | Cross-platform |
Platform | Java |
Available in | English |
Type | Object database |
License | LGPL |
Website | neodatis.org |
NeoDatis ODB is an object database available the GNU Lesser General Public License, hence usable in free or commercial applications. NeoDatis ODB is available both for Java and .NET, the latter being still under development.
Features
- Support for Native Queries (see below).
- NeoDatis is simple and intuitive. Objects can be easily be added to a database, requiring no boilerplate, nor modification to already existing classes.
- ODB Explorer: a graphical tool to browse, query, create, update, and delete objects, as well as import/export the database from and to XML files.
Types of Queries
NativeQuery
To perform a native query, an object implementing a method named match
is sent to the database. Such method receives each object of a determined class from the database, and returns a boolean value determining whether each one should be returned as part of the query result or not.
Usage of such queries would be for example:[1]
IQuery query = new SimpleNativeQuery() {
public boolean match(Player player) {
return player.getFavoriteSport().getName().toLowerCase().startsWith("volley");
}
};
Objects<Player> players = odb.getObjects(query);
NeoDatis version 1.9x does not implement the suggested Native query analyser and performance enhancements suggested in the Cook paper,[2] the likes of which are implemented in a more mature object database like db4o.
Therefore, NeoDatis's NativeQuery and SimpleNativeQuery have reduced performance compared to other types of queries (CriteriaQuery), since every object of a certain class in the database must be instantiated, along with its members. However, they maintain some principles of object-oriented programming (encapsulation and data abstraction), which other types of queries do not.
CriteriaQuery
A CriteriaQuery allow retrieval of objects by queries which compare object attributes. Its syntaxis is somewhat SQL-like. A simple example is:
IQuery query = new CriteriaQuery(Player.class, Where.equal("name", "olivier"));
Objects<Player> players = odb.getObjects(query);
References
- ↑ http://www.neodatis.org/5m-tutorial#toc7
- ↑ http://www.cs.utexas.edu/users/wcook/papers/NativeQueries/NativeQueries8-23-05.pdf
External links
Similar databases
- db4o
- objectdb