Database definition with Ibatis

Introduction

The iBATIS Data Mapper framework will help you to significantly reduce the amount of Java code that you normally need to access a relational database. iBATIS simply maps JavaBeans to SQL statements using a very simple XML descriptor. Simplicity is the key advantage of iBATIS over other frameworks and object relational mapping tools. To use the iBATIS Data Mapper you need only be familiar with JavaBeans, XML and SQL. There is very little else to learn. There is no complex scheme required to join tables or execute complex queries. Using Data Mapper you have the full power of real SQL at your fingertips.

Data Mapper (com.ibatis.sqlmap.*)

Concept

The iBATIS Data Mapper API allows programmers to easily map JavaBeans objects to PreparedStatement parameters and ResultSets. The philosophy behind Data Mapper is simple: provide a simple framework to provide 80% of JDBC functionality using only 20% of the code.

How does it work?

Data Mapper provides a very simple framework for using XML descriptors to map JavaBeans, Map implementations, primitive wrapper types (String, Integer…) and even XML documents to an SQL statement. The following is a high level description of the lifecycle:

Resources