Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Suggestion to avoid Refrential Integrity in DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Keanehelp

New User


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

PostPosted: Mon Mar 15, 2010 11:24 am    Post subject: Suggestion to avoid Refrential Integrity in DB2
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: 1280
Location: Belgium

PostPosted: Mon Mar 15, 2010 2:35 pm    Post subject:
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: 70
Location: USA, CA.

PostPosted: Mon Mar 15, 2010 3:47 pm    Post subject:
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: 1280
Location: Belgium

PostPosted: Mon Mar 15, 2010 5:07 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts DB2 SQL help/idea/suggestion bshkris DB2 4 Thu Oct 06, 2016 3:04 pm
No new posts Suggestion on Search and Split using ... shiitiizz DFSORT/ICETOOL 14 Tue Jun 16, 2015 1:20 pm
No new posts How to avoid/Omit Addtional qualifer ... cmsmoon TSO/ISPF 2 Thu Nov 27, 2014 6:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us