iBATIS SQL Maps Tutorial

The SQL Maps framework is very tolerant of bad database models and even bad object models. Despite this, it is recommended that you use best practices when designing your database (proper normalization) and your object model. By doing so, you will get good performance and a clean design. The easiest place to start is to analyze what you’re working with. What are your business objects? What are your database tables? How do they relate to each other? For the first example, consider the following simple Person class that conforms to the typical JavaBeans pattern.

How does this Person class map to our database? SQL Maps doesn’t restrict you from having relationships such as table-per-class or multiple-tables-per-class or multiple-classes-per-table. Because you have the full power of SQL available to you, there are very few restrictions. For this example, let’s use the following simple table which would be suitable for a table-per-class relationship

Get pdf download iBATIS SQL Maps Tutorial

Related Tutorial

Tags: , , , , , , , , , , , ,

Comments

Leave a Reply