• 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

referential integrity exceptions, foreign key constraints

 
Ranch Hand
Posts: 930
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am a java developer, now working on a project with lot of stored procedures, functions, database interactions. I keep getting almost weekly new data model physical, logical diagrams with 50-100 tables in each diagram with lot of interactions between the tables like many-one etc mappings, compound keys, surrogate keys. I am frequently getting referential integrity exceptions, foreign key constraint etc from my java application due to frequent changes on the database side. Please advise me how can i improve my data modelling reading, understanding skills so that i can be on top of the changes and make my java application not to break due to these changes. Please advise. Any links, ideas, resources, sample code highly appreciated. Thanks in advance
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sai rama krishna wrote:I am a java developer, now working on a project with lot of stored procedures, functions, database interactions. I keep getting almost weekly new data model physical, logical diagrams with 50-100 tables in each diagram with lot of interactions between the tables like many-one etc mappings, compound keys, surrogate keys. I am frequently getting referential integrity exceptions, foreign key constraint etc from my java application due to frequent changes on the database side. Please advise me how can i improve my data modelling reading, understanding skills so that i can be on top of the changes and make my java application not to break due to these changes.


Sounds to me like either:
  • The DBAs (and I was one for 15 years) aren't doing their job properly - ie, they aren't informing you - in a language you can understand - how the changes they have made might affect the structural integrity of their tables. That might cause referential integrity issues.
  • Your programs aren't checking that "links" between tables actually exist. That would cause your "foreign key" issues (although it's also a database issue).

  • However, it sounds to me as though someone may have decided to "turn off" or (more likely) "turn on" referential integrity for the entire database; though how anybody would have the power to do that on even a moderate-size database that's in production without months of planning, I have no idea.

    Are you under new management by any chance?

    Winston
     
    sai rama krishna
    Ranch Hand
    Posts: 930
    2
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Yes, I am in a new project which has crazy working model where developers have to drive and take care of many things including database stuff
     
    reply
      Bookmark Topic Watch Topic
    • New Topic