GeeCON Prague 2014*
The moose likes Object Relational Mapping and the fly likes Ibatis and schema creation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Ibatis and schema creation" Watch "Ibatis and schema creation" New topic
Author

Ibatis and schema creation

Geoff Thé
Greenhorn

Joined: Dec 08, 2004
Posts: 7
One of the features we like about hibernate is that it will automatically generate a schema for you basic on your mapping files -- does Ibatis have similar facilities?


SCJP 1.4 (86%)<br />SCWCD (81%)<br/>SCJP 6 (85%)
Clinton Begin
author
Greenhorn

Joined: Nov 08, 2006
Posts: 21
No, iBATIS does not generate your schema for you (unless Abator does it, which you can look into).

But honestly, if I were in a situation where I was able to build my own database schema from scratch, I'd probably use Hibernate anyway.

iBATIS was built for what I call "red pill" projects -- or real projects. ;-)

I work mostly on "enterprise" systems I've never had the luxury of having full control over the database design, let alone the luxury to generate the schema. In almost all cases the database already exists and in most cases it's not even a single database.

So yes, if you're generating the schema, use Hibernate. If you ever run into an existing enterprise or legacy system, use iBATIS. That said, I do know a lot of people who choose iBATIS even when they are starting from scratch.

Cheers,
Clinton
Salman Khattak
Ranch Hand

Joined: Mar 23, 2003
Posts: 33
.. and that is what I like about iBatis.

Make your own schema's and have as much fine tuned, intricate queries as you like. Go wild! iBatis will map the result-set to your objects with lightning speed... as long as you have defined the mapping correctly!

also there is abator
[ December 05, 2006: Message edited by: Salman Khattak ]

SCJP Java 1.4 - 06/2003<br />Power corrupts and absolute power corrupts absolutely!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

"Geoff The",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Timothy Toe
Ranch Hand

Joined: Oct 19, 2002
Posts: 156
That said, I do know a lot of people who choose iBATIS even when they are starting from scratch.


I never like the idea of generating the DB schema. DB design, to me, is far too important for it to be generated. Even if I start from stratch, I like to design & normalise the DB 1st (and not the OO design). As such, I think iBatis is more suitable for me than the OO-centric Hibernate.
 
GeeCON Prague 2014
 
subject: Ibatis and schema creation