分类:
2008-10-13 16:13:59
db4o is designed to be a simple, easy-to-use, and fast, native object database. Software developers using popular Java and .NET object-oriented frameworks know that using an object oriented databases is a more natural way to get work done. Developers have three ways to storing and retrieving data: relational, non-native object and native object.
Relational databases, such as Oracle, IBM’s DB2 and Microsoft’s SQL server, store data in a tabular, row-and-column metaphor. The organization of traditional data in a relational database is easy to understand. The concept took off and today most data is stored in relational databases.
However, as object-oriented models became popular, developers were spending time trying to map objects into a relational database. Today, developers are forced to rely on relational-to-object mappers, but this technology compromise adds a layer of complexity and degrades performance. It is best suited for organizations that rely on legacy data.
Non-native object databases came on to the market in the early 1990s with great fanfare. But their promise was largely unfulfilled. Developers found the technology expensive, complex and hard to use. The first native object databases had similar shortcomings.
db4o is based on new native object database technology. It offers Java and .NET developers the simplest and easiest way to store even complex objects and achieve highest performance. db4o is the only native object database designed for both Java and .NET, supplied as one single programming library (Java: .jar /.NET: .dll) to be included with developer applications. Whether you look for a Java database, a .NET database, a C# database, a Mono database, or any embedded database - db4o is the right choice for you.
Key Features | Key Benefits |
|
One line of code stores any object | |
public void store(Car car){ ObjectContainer db = Db4o.openFile("car.yap"); db.set(car); db.commit(); db.close(); } |
|
db4o is native Java / native .NET | |
|
|
class model == database schema | |
|
|
Just store objects as they are | |
|
|
Automatic schema versioning | |
|
|
Query by Example (QbE) | |
public car[] query( ObjectContainer db, Car car){ ObjectSet objectSet = db.get(car); Car[] cars = new Car[objectSet.size()]; int i = 0; while(objectSet.hasNext()){ cars[i++] = (Car)objectSet.next(); } return cars; } |
|
S.O.D.A. active queries | |
final Pattern pattern = Pattern.compile("In*Si"); query.constrain(new Evaluation() { public void evaluate( Candidate candidate) { String str = (String)candidate.getObject(); boolean ok = pattern.matcher(str).matches(); candidate.include(ok); } }); |
|
250kB footprint | |
|
|