what is the best data access method for java?

Discussions

EJB design: what is the best data access method for java?

  1. hiye, I'm going to try developing a web application using java technology, so please be patient with me if i were to ask stupid questions.

    I've been developing web application using ms technology for the past 4 years. And i know the best data access for ms access would be oledb.net and for sql server 2000 would be sqlclient.net.

    As for java, what would be the best data access method for ms sql server, mysql and ms access?

    thanks in advance for the reply.


    yours truly

    Xmen
  2. The acronym you're looking for is JDBC. However, there are several ways to get a JDBC connection:

    A) Open a connection to a database yourself. This is the only option when you're doing a standalone J2SE application.
     
    B) Get the connection from a pool provided by the application server (or web container). This is the preferred option whenever it's available as the database connection pool's configuration is left to the administrator (and of course you don't need to code the pool management yourself).
  3. Hi,

    As with Microsoft Technologies, Java does have many ways of Dataaccess and each of these's usability and advantages depend on the context you use them.

    1. For Web based applications without Application Server and if user Web Server doesnt provide for Connection Pooling, you have to hand code the Jdbc code and maintain connections yourself. This is good in the sense, you have total control of your code.

    2. If your server does provide for Connection Pooling, you can use it. These puts most of the burden on the Server and you can concentrate on your problem.

    3. Entity Beans (EJB) does provide lot of automation. This almost elminates Jdbc from your components by a factor of 10 to 50 depending on your application's data dependency.

    4. try JDO it is really good in many ways!!!