Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to connect data base without jdbc?

 
vikas Radhakisan kachave
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to connect database without jdbc?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you want to use JDBC?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vikas,
Welcome to JavaRanch!

You could use a command line script. If you are using Java, JDBC is much easier though.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4010
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ;) .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic