aspose file tools*
The moose likes JDBC and the fly likes how to connect data base without jdbc? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to connect data base without jdbc?" Watch "how to connect data base without jdbc?" New topic
Author

how to connect data base without jdbc?

vikas Radhakisan kachave
Greenhorn

Joined: Aug 24, 2006
Posts: 2
How to connect database without jdbc?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Why don't you want to use JDBC?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42600
    
  65
While this is of course possible, can you tell us the reason you're asking? Is it curiosity or do you have an actual DB for which -for whatever reason- you cannot use JDBC?


Ping & DNS - my free Android networking tools app
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30919
    
158

Vikas,
Welcome to JavaRanch!

You could use a command line script. If you are using Java, JDBC is much easier though.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3716
    
    5

You can use an object-relational technology like JDO or Hiberate that 'hides' the jdbc from the application programmer, but it is still used behind the scenes.

Better question tho... what database software are you using and why is JDBC not allowed?
[ August 30, 2006: Message edited by: Scott Selikoff ]

My Blog: Down Home Country Coding with Scott Selikoff
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

If you're trying to connect to an ODBC database, you can always use a JDBC-ODBC brige. The worst of ODBC and JDBC combined!!!
Masoud Kalali
Author
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

Originally posted by vikas Radhakisan kachave:
How to connect database without jdbc?


You can not connect to a database without JDBC , even JDBC-ODBC bridge is jdbc itself,AFAIK.

but you can use some other frameworks which wrap JDBC APIs and provide another API for you(developer) to access the database rather than working with JDBC API directly.

for example Hibernate , JDO , IBatis .... these frameworks provide OR Mapping for your tables ,they allows you to interact with your rational database as an object model.

But you are not free from using JDBC , your application use JDBC butt you can not see it , you just see the Hibernate , JDO.... APIs.


Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42600
    
  65
You could connect to the DB on the TCP/IP level, use the wire-level protocol of the database (if it's documented), and put whatever API you want on top of it. But without knowing the intent of the question, it makes little sense to go into more detail about this.
[ August 31, 2006: Message edited by: Ulf Dittmer ]
Masoud Kalali
Author
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

Originally posted by Ulf Dittmer:
You could connect to the DB on the TCP/IP level, use the wire-level protocol of the database (if it's documented), and put whatever API you want on top of it. But without knowing the intent of the question, it makes little sense to go into more detail about this.

[ August 31, 2006: Message edited by: Ulf Dittmer ]


TCP/IP level , i never used to connect to a database in a raw TCP/IP manner it should be horrible ,isnt it ?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Originally posted by Masoud Kalali:


:shocked: TCP/IP level , i never used to connect to a database in a raw TCP/IP manner it should be horrible ,isnt it ?


Yes it probably would be. The JDBC driver itself probably uses this route, since a JDBC driver doesn't have the luxury of a JDBC driver to connect to a database ;) .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to connect data base without jdbc?