Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Table Inheritence in oracle?

 
scott miles
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anybody brief about Table inheritence in oracle with simple example. Tried to look on different website
but did not get any concrete simple example? say if we have employee class in java and Manager class is extending
employee. Now i want to insert the values in manager class. then some values should go to employee table too along with manager table. could some body help me how we can achieve this thru JDBC?
 
chris webster
Bartender
Posts: 2407
32
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tables are not classes or objects so they do not inherit anything. You could have a column in your table to distinguish managers e.g. Employee_type. This will allow you to put all the records in one table but identify managers as a subset. If you are going to use a relational database like Oracle, you need to find out why relational data modelling is different from OO modelling.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic