SimpleORM

SimpleORM is an open source object relational mapping tool written in Java. It is intended as a simple, yet effective layer on top of JDBC.

SimpleORM represents records as a map of fields to values. Hence no reflection or configuration XML is used. Unlike Hibernate, the table mappings are part of the code. SimpleORM achieves simplicity at the cost of transparent persistence. A SimpleORM connection is based on an existing JDBC connection and is associated with the current thread.

Hibernate ORM

Hibernate CoreHibernate is a powerful object relational mapping tool written in Java. Hibernate allows you to develop persistent classes mirroring object oriented paradigm - including association, inheritance, polymorphism, composition, and collections. Hibernate has its own portable SQL based langugage (HQL) or can work with native SQL. Hibernate simplifies persistence programming tasks by providing a higher abstraction.

Hibernate is a suite of tools for ORM, including Hibernate core, Hibernate Tools, Hibernate search etc. Only core is required for basic ORM. Each component is available as a separate download.

Hibernate stores table to class mapping in an external XML file. Following is a sample,

<hibernate-mapping>
    <class name=”tasks.Task” table=”TASKS”>
        <id name=”id” column=”TASK_ID”>
            <generator class=”native”/>
        </id>
        <property name=”date” type=”timestamp” column=”TASK_DATE”/>
        <property name=”title”/>
    </class>
</hibernate-mapping>

  • Related

    • No related posts