I would like to share my knowledge, which I worked in earlier project. It’s related to Database connectivity framework (Hibernate). Before going to main concept we should now about traditional database connectivity tool (JDBC).
JDBC stands for Java Database Connectivity and provides a set of Java API for accessing the relational databases from Java program. These Java APIs enables Java programs to execute SQL statements and interact with any SQL compliant database.
Drawbacks of JDBC:
1.Complex if it is used in large projects
2.Large programming overhead
3.Hard to implement MVC(Model, View, Controller) concept
4.Query is DBMS specific
When we work with an object-oriented systems, there's a mismatch between the object model and the relational database. RDBMSs represent data in a tabular format whereas object-oriented languages, such as Java or C# represent it as an interconnected graph of objects.
To overcome the above problems ORM concept is introduced.ORM stands for Object-Relational Mapping (ORM) is a programming technique for converting data between relational databases and object oriented programming languages such as Java, C# etc. An ORM system has following advantages to overcome JDBC drawbacks
Advantages of ORM:
1.Lets business code access objects rather than DB tables.
2.Hides details of SQL queries from DB logic.
3.No need to deal with the database implementation(Database Independent).
4.Entities based on business concepts rather than database structure.
5.Transaction management and automatic key generation for transaction.
6.Fast development of application.
java ORM frameworks:
1.Spring DAO(Popular in the market)
2.Hibernate(Popular in the market)
3.Enterprise JavaBeans Entity Beans
4.Java Data Objects
5.Castor
6.TopLink
JDBC stands for Java Database Connectivity and provides a set of Java API for accessing the relational databases from Java program. These Java APIs enables Java programs to execute SQL statements and interact with any SQL compliant database.
Drawbacks of JDBC:
1.Complex if it is used in large projects
2.Large programming overhead
3.Hard to implement MVC(Model, View, Controller) concept
4.Query is DBMS specific
When we work with an object-oriented systems, there's a mismatch between the object model and the relational database. RDBMSs represent data in a tabular format whereas object-oriented languages, such as Java or C# represent it as an interconnected graph of objects.
To overcome the above problems ORM concept is introduced.ORM stands for Object-Relational Mapping (ORM) is a programming technique for converting data between relational databases and object oriented programming languages such as Java, C# etc. An ORM system has following advantages to overcome JDBC drawbacks
Advantages of ORM:
1.Lets business code access objects rather than DB tables.
2.Hides details of SQL queries from DB logic.
3.No need to deal with the database implementation(Database Independent).
4.Entities based on business concepts rather than database structure.
5.Transaction management and automatic key generation for transaction.
6.Fast development of application.
java ORM frameworks:
1.Spring DAO(Popular in the market)
2.Hibernate(Popular in the market)
3.Enterprise JavaBeans Entity Beans
4.Java Data Objects
5.Castor
6.TopLink
No comments:
Post a Comment