Data Access Technologies in Java
By: Lakshmi
Database access has been part of Java since Sun Microsystems added the JDBC API as an addon to Java 1.0. Since then, Sun has also added Enterprise JavaBeans (EJBs) and most recently Java Data Objects (JDO) to Java. That isn’t all; Sun is only one of the many organizations supporting database access from Java. Numerous vendors have sprung up over the years to provide JDBC implementations and Object-Relational Mapping (O/R) frameworks for Java.
There are a lot of choices for data access in JSP. In this tutorial, we’ll sort out the choices by dividing them into five categories starting with the simplest and ending with the most sophisticated. The five data access technologies, from simplest to most sophisticated, are as follows:
• JSP tags for SQL
• JDBC
• O/R frameworks
• JDO
• EJB entity beans
When you choose a data access technology, you should consider both the nature of the web application that you’re developing and the skills of your development and support teams. Generally speaking, if you have simple requirements and a less experienced team, you should favor the simple end of the spectrum. If you have more complex requirements and a more experienced team, you should favor the sophisticated side. Here are some questions to consider:
-
Does your application have fairly simple database access requirements? Perhaps you need only to display a couple of reports based on information in a database. For simple applications, you might want to avoid the learning curve, complexity, and overhead of a more sophisticated data access technology.
-
Will your application have a complex Java object model that must be persisted to a database? If so, you might find that you really cannot do without the sophisticated automated object-relational mapping capabilities of an O/R framework or of EJB container-managed persistence (CMP).
-
Is your application one that is highly transactional, requires high availability, and is likely to support a large number of concurrent users? If so, you might need the declarative transaction support, fault tolerance, and load balancing provided by EJB servers.
-
Which Java data access technologies do your developers know? What level of database knowledge do your developers have? Will you need training? If your team has previous experience with database access, that might influence your selection of a database access technology.
Archived Comments
Comment on this tutorial
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
TEXT datatype SPLIT in MSSQL - to solve the 8000 limit set by varchar
What is Referential Integrity in databases?
Handling CSV in Stored Procedures
java.lang.NoClassDefFoundError and java.lang.NoSuchMethodError
Calling a Stored Procedure from JDBC in Java
setSavepoint and releaseSavepoint Example in Java
PreparedStatement Example in Java
Creating Database Tables Using ANT
Using the DriverManager Class vs Using a DataSource Object for a connection
Stored Procedures example in SQL