• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

JDBC and Inheritance

 
Greenhorn
Posts: 17
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai... Friends

I have a problem with inheritance, any one please guide me.

I can't understand, weather JDBC support inheritance or not ?
If yes then how, if not then how.

Advance Thanks....
 
author & internet detective
Posts: 41502
881
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JDBC uses inherhitance. CallableStatement extends PreparedStatement. But I don't think that is what you are asking.

JDBC just runs SQL. It doesn't do mapping to your object structure. Which means it can't support inheritance. Your code would need to do this.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JDBC and inheritance are two completely different things, that don't really have anything to do with each other. So the question is a bit strange. Can you explain in more detail what you mean by this question?
 
Hemakanta Sethi
Greenhorn
Posts: 17
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper de Jong wrote:JDBC and inheritance are two completely different things, that don't really have anything to do with each other. So the question is a bit strange. Can you explain in more detail what you mean by this question?




In case of Hibernate, it supports the three basic inheritance mapping strategies. It means when ever we save a derived class object then hibernate automatically stores it's base class data into the Database table. Like it, i want to know JDBC support inheritance or not.
Thanks
 
Marshal
Posts: 27531
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would suggest you spend some time reading a JDBC tutorial. Then you should be able to answer for yourself whether JDBC supports inheritance -- whatever that might mean to you. Or at least it would make it easier for you to ask a more specific question.
 
Jeanne Boyarsky
author & internet detective
Posts: 41502
881
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Repeating my answer: No because JDBC doesn't map to objects. The question doesn't apply to JDBC.
 
Hemakanta Sethi
Greenhorn
Posts: 17
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, thanks for the helpful info!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic