• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Foreign Key Mapping with a Compund Key

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am now stuck with an issues in setting the annotations right.

The issue is i have table which has a composite key [2 primary Keys] and another table which has a composite key in which one key of the initial table.

Table: Feature Master
FeatureId Pk
FeatureName
Description
Intermidate Pk

One to Many [ One record in Feature Master can have multiple records in cfg Master]

Table: CfgMaster
FeatureId FK
configName Pk
datakey
Intermidate pk

Can anyone please highlight the structure of tables on the above schema.

Any Help is much appreciated.

Thanks in Advance.
 
author & internet detective
Posts: 41878
909
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
Binnym,
Welcome to CodeRanch!

I don't know how to map that either. It sounds really complicated. You might want to consider using an artificial generated key to break the relationship of "immediate" being used for two things. It might actually be worth doing that anyway since ConfigName sounds like something that could change. It's best not to have primary keys that change.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic