Puneet Varma (Editor)

QuickDB ORM

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Developer(s)
  
Diego Sarmentero

Written in
  
Java

Type
  
ORM

Development status
  
Active

Operating system
  
Cross-platform

QuickDB ORM

Stable release
  
1.2 / January 10, 2010 (2010-01-10)

QuickDB is an object-relational mapping framework for the Java software platform. It was developed by Diego Sarmentero along with others and is licensed under the LGPL License. Versions for .NET, Python and PHP are also being developed.

Contents

Concepts

QuickDB allows a developer to focus on the definition of the entities that represent the tables of the database and perform operations that allow the interaction between these entities and the database without having to perform tedious configurations, leaving to the library the task to infer the object structure and make the mapping of the object to the Database.

The software aims not only to simplify the task of mapping the attributes between a traditional relational database and the objects from the data model, but in turn, make the use of the library intuitive for the developer, leaving aside configuration tasks. Where each operation involves only the task (save, modify, ...) and the subject where it should apply to (the object).

QuickDB, like other tools for object-relational mapping, seeks to resolve the differences between the two co-existing data models: Object-Oriented Model and the Relational Model. To address this problem, it takes a fully object-oriented approach, where structures like "Objects composed of other objects", "Inheritance", "Collections" (one-to-many and many-to-many) are recognized by default as common entities, and also other features such as automatic table creation and modification of tables dynamically if the structure of the object change over time (addition of new attributes) are included. QuickDB not require the implementation of any interface, or the use of inheritance by the data model to be persistent, it is based simply on certain naming conventions for attributes to infer relevant information about the Object. However, it is possible to use annotations to set certain characteristics of the object, which gives the assurance that everything that QuickDB recognize by default, can be also managed completely by the developer. For queries, QuickDB pretends to maintain this approach where the developer works with the data model in a fully object-oriented way, and therefore the SQL statements (although they are permitted) are not necessary, and can be used by default a Query system where the condition to be evaluated is specified with a simple reference to the attributes in the objects from the data model.

This capabilities can be combined with Inheritance, Compound Objects, Collections (Many to Many Relation, One to Many Relation) and Automatic Table Creation.

Using QuickDB

Example Classes::

Result: save

Tables are automatically created and the Employee object is saved with all the objects related to it.

Address

Phone

Person

PersonPhone

Employee

Operation: obtain

The Employee object which inherited attribute address has the value "unnamed street" in street is retrieved.

Operation: modify

Change the name from the Employee object and add a new Phone to the collection (the obtain operation must be performed previously to retrieve the object).

Operation: delete

Delete a specific Employee object (after retrieve the object with obtain operation).

Inheritance: AdminBinding

QuickDB also provides the possibility of allowing the developer to create the data model extending the AdminBinding Class (but this is not required, this is another available resource to simplify some processes), which serves as a "link" between the entities and AdminBase to allow the operations that interact with the database to be executed from the object itself and not use AdminBase intermediary as directly.

AdminBinding not cover all the functionality that AdminBase provides, as it only handles those operations that are specific to the object that contains them, leaving out those that refer to collections, etc.

More Features

QuickDB includes many features that can be consulted on the Project Page. An important detail to take into account is that with every new feature that is added, the simplicity of QuickDB is maintained without sacrifice functionality.

References

QuickDB ORM Wikipedia