aspose file tools
The moose likes JDBC and Relational Databases and the fly likes r there any other way to connect to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "r there any other way to connect to database " Watch "r there any other way to connect to database " New topic

r there any other way to connect to database


Joined: Nov 13, 2000
Posts: 5
Hai All,
R there any other way to connect database other than JDBC. if yes, pl. reply
Thanks in advance.
Ranch Hand

Joined: Aug 06, 2000
Posts: 60
if ur using java, u need dabase drivers that need to be compatible with java, which can be done using jdbc only.

Frank Carver

Joined: Jan 07, 1999
Posts: 6920
The Java Ranch has a naming policy, described here and "megalag" is not a valid name. Please choose one which meets the requirements.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Gregg Dale

Joined: Nov 16, 2000
Posts: 7
There is an .asp hybrid shortcut we have used on projects here where I work to pass data requests to a database and return disconnected recordsets.
Using we open an .asp page as a document, passing stored procedure name and parameters as the querystring portion of the url (in a couple of cases we have passed simple sql), using ADO in the .asp to execute the query, and response.write'ing the result in a deliminited fashion easily parsible by the calling java class.
Its quick and easy for executing updates and returning disconnected recordsets, but won't, of course give you a static connection to the database.
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
There are many other ways of connecting to databases, but they all need extra work, and all are specific to particular databases or database interfaces. For example, you could implement Oracle's SQL.NET protocol yourself, rather thna using Oracle's thin drivers, or write code to parse the data structures in an Access MDB file. You would need to deal with threading issues and data integrity yourself, but it could theoretically be done.
When JDBC is so easily available, powerful, and implemented for such a wide range of databases there seems little reason other than personal interest to do any of this, though. If you are interested in this sort of thing, there is a book "Java Database Programming" by Brian Jepson, published by Wiley, which describes in detail the implementation of an SQL database which uses plain text files for data storage, and includes all the source code.
Ray Hunter

Joined: Aug 01, 2000
Posts: 20
However there are some draw backs to JDBC. Some might be speed. When you are connecting to a database the first thing to do is find out how many hit the page will have and about how many queries will be expected.
Sometimes java is better to use on a site that gets more hits then another.
Sometimes you can use other languages that will be faster. It is all relative to the site.
Many times I use PHP to interface with an Oracle database or Postgres database.
On the sites that use PHP, jdbc was slower.
RMI would be another option to look into.
Hope that answers some questions.

I agree. Here's the link:
subject: r there any other way to connect to database