IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Suggestion to avoid Refrential Integrity in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Keanehelp

New User


Joined: 27 May 2008
Posts: 71
Location: USA, CA.

PostPosted: Mon Mar 15, 2010 11:24 am
Reply with quote

Hi,

We are in a process of designing a DB2 data base for our application. While designing a DBA suggested to avoid foreign keys (refrential integrity) as it makes(as per him) data recovery very troublesome in DB2.

I also did some resarch and find out that DB2 lacks cross platform Refrential Integrity.

but I am still not convinced about this thought.

Any suggestions/comments are welcome.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Mar 15, 2010 2:35 pm
Reply with quote

"Making data recovery troublesome" is IMHO not a good reason not to do it.
RI is a business requirement.
If you think you can fulfill that requirement by Application code and waterproof data recovery guidelines, feel free to go for it.
Back to top
View user's profile Send private message
Keanehelp

New User


Joined: 27 May 2008
Posts: 71
Location: USA, CA.

PostPosted: Mon Mar 15, 2010 3:47 pm
Reply with quote

Thanks for the reply GuyC,

Could you also let me know how tough it is to recover data in case of RI based Database?

Is it a good enough reason for avoiding RI?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Mar 15, 2010 5:07 pm
Reply with quote

Suppose you have several tables connected with RI.

It is not enough to restore one table, you might need to restore the children as well. otherwise you can get orphans.
This you might get with or without RI. The only difference is that with RI, DB2 will notice and will refuse to put the tables RW. (you can always force it)

Without RI you don't need to check or force children tables, but you'll never be 100% sure the data is correct.

In a reasonably sized data model (possibly with circular RI ), restoring a table often means restoring other tables and/or checking a lot of tables before you application is back up and running.


It depends on the application :
Is data integrity important?
Is it a volatile application ?
How important is a fast restart while restoring ?
Do you need other table being live while restoring some tables ?

Having a lazy DBA shouldn't be a reason to jeopardize data integrity, fast or partial availability could be.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to avoid duplicating a CICS Web S... CICS 0
No new posts Need suggestion on a sort card DFSORT/ICETOOL 10
No new posts Need suggestion on CICS READ UPDATE CICS 8
No new posts Suggestion on KSDS VSAM READ in CICS CICS 5
No new posts Need suggestion on how to force refer... DB2 7
Search our Forums:

Back to Top