aspose file tools*
The moose likes JDBC 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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "r there any other way to connect to database " Watch "r there any other way to connect to database " New topic
Author

r there any other way to connect to database

megalag
Greenhorn

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.
KASI VISHWANATH
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.
------------------
I.K.VISHWANATH


I.K.VISHWANATH
Frank Carver
Sheriff

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.
Thanks.


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

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 java.net 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
Sheriff

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
Greenhorn

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.

Ray
 
wood burning stoves
 
subject: r there any other way to connect to database