Showing posts with label hibernate interview. Show all posts
Showing posts with label hibernate interview. Show all posts

Use Configuration Interface in hibernate?

What’s the usage of Configuration Interface in hibernate?
Configuration interface of hibernate framework is used to configure hibernate. It’s also used to bootstrap hibernate. Mapping documents of hibernate are located using this interface.




www.cinterviews.com appreciates your contribution please mail us the questions you have to cinterviews.blogspot.com@gmail.com so that it will be useful to our job search community

How properties of a class are mapped to the columns of a database table in Hibernate?

How properties of a class are mapped to the columns of a database table in Hibernate?
Mappings between class properties and table columns are specified in XML file as in the below example:
http://capptitudebank.blogspot.com
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

www.cinterviews.com appreciates your contribution please mail us the questions you have to cinterviews.blogspot.com@gmail.com so that it will be useful to our job search community

What is ORM? Hibernate interview Question

What is ORM? Hibernate interview Question
ORM (Object Relational Mapping) is the fundamental concept of Hibernate framework which maps database tables with Java Objects and then provides various API’s to perform different types of operations on the data tables.

www.cinterviews.com appreciates your contribution please mail us the questions you have to cinterviews.blogspot.com@gmail.com so that it will be useful to our job search community

What is Hibernate? interview Question

What is Hibernate? interview Question
Hibernate is a popular framework of Java which allows an efficient Object Relational mapping using configuration files in XML format. After java objects mapping to database tables, database is used and handled using Java objects without writing complex database queries.
www.cinterviews.com appreciates your contribution please mail us the questions you have to cinterviews.blogspot.com@gmail.com so that it will be useful to our job search community

What is the difference between hibernate and jdbc ?

What is the difference between hibernate and jdbc ?
1) Hibernate is data base independent, In case of JDBC query must be data base specific.
2) As Hibernate is set of Objects , SQL Language learning is not required. TABLE can be treated as Java Object 3) Don?t need Query tuning in case of Hibernate. If you use Criteria Quires in Hibernate then hibernate automatically tuned your query and return best result with performance. In case of JDBC you need to tune your queries.
4) You will get benefit of Cache. Hibernate support two level of cache. First level and 2nd level. So you can store your data into Cache for better performance. In case of JDBC you need to implement your java cache .
5) Hibernate supports Query cache and It will provide the statistics about your query and database status. JDBC Not provides any statistics.
6) Development fast in case of Hibernate because you don?t need to write queries
7) No need to create any connection pool in case of Hibernate. You can use c3p0. In case of JDBC you need to write your own connection pool
8) In the xml file you can see all the relations between tables in case of Hibernate. Easy readability.
9) You can load your objects on start up using lazy=false in case of Hibernate. JDBC Don?t have such support. <> 10 ) Hibernate Supports automatic versioning of rows but JDBC does not.