JDBC, Ibtais, Hibernate, SPRINGJDBC is we usually in the process of development of the use of more than a few of the persistence of technology, specific in the development process how to choose it.
First of all, the characteristics of the first is JDBC, this is the Java language provided by the specification, the main is to define some interfaces and communication classes, the interface is well defined, the various database vendors to provide specific implementation, such as Oracle,mysql, and so on, these manufacturers have their own JDBC specific implementation, of course, We can also implement one ourselves, but the cost is high. For JDBC, the main characteristics of the individual is the original, high efficiency (with good use of the case), the use of more flexible, the shortcomings are also very obvious, the development of the code more verbose, scalability is not good enough.
Then Ibatis, now renamed MyBatis, is a semi-automatic ORM framework that requires us to write our own SQL statements, with the main feature of mapping SQL statements and Java field, and mapping through Parametermap and Resultmap, so , Ibatis is also more flexible to use, can write their own SQL, and if your company has a master DBA, to give him to optimize or write SQL is also a good choice, the disadvantage, because the SQL statement and the specific database, changed the database, Then the SQL statement needs to be rewritten or modified.
Compared with the ibatis is a lot of hibernate, which can be considered an automated ORM framework, should be for his own HQL statement interpreter, using this feature, developers can write a HQL statement can be, as long as in different databases using different drivers, This can be more convenient in different db switch or transplant, but some more complex SQL statements in the conversion to HQL statements are more difficult, if there is no hibernate development master, personal feel or use ibatis better
Spring's core idea is IOC and AOP, but in order to compete with other frameworks, Spring has also implemented a set of JDBC things that can be used to simplify the amount of code developed, and spring itself provides powerful support for things, This is where I think he's more characteristic.
Therefore, the general project before the development of the first frame, choose what kind of persistence scheme according to the situation of their own team, rather than what others say good on what to use.