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

Choose the Best in ON DELETE question


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arunsingh

New User


Joined: 21 Jun 2006
Posts: 1
Location: Pune

PostPosted: Thu Jul 13, 2006 4:17 pm
Reply with quote

Given a qustion and only 1 answer is correct.

Q. Which of the following options you prefer if your business need to keep your TABLE data on "T1" intact but allows referencing table data on "T2" to be deleted. Assume a foreign key on T1 references an unique key on T2.

1) ON DELETE CASCADE
2) ON DELETE SET NULL
3) ON DELETE RESTRICT
4) NONE
Back to top
View user's profile Send private message
Jerry

New User


Joined: 16 Sep 2005
Posts: 42

PostPosted: Tue Jul 18, 2006 4:36 pm
Reply with quote

Hi Arunsingh,

I would choose ON DELETE SET NULL.
Back to top
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Mon Aug 07, 2006 1:58 pm
Reply with quote

ON DELETE CASCADE
should be selected.if the parent rows are deleted,teh corresponding rows in the child will also be deleted.
Back to top
View user's profile Send private message
Jerry

New User


Joined: 16 Sep 2005
Posts: 42

PostPosted: Mon Aug 07, 2006 3:09 pm
Reply with quote

Hi Stly,

Did you note that arunsingh had said:

Quote: allows referencing table data on "T2" to be deleted.
Back to top
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Mon Aug 07, 2006 6:24 pm
Reply with quote

yes jerry,
ih u chhose cascade then the cirresponding child info will also be deleted when ever parent info iss deleted.but according to u the child info will not be deleted but it will be set to NULL.

RESTRICT WILL NOT ALLOW TO DELTE ANY RECORDS IN THE APRENT TABLE IF IT HAS CORRESPONDING R3ECORDS IN THE CHILD TABLE.


CORRECT ME IF I M NOT CORERCT
Back to top
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Mon Aug 07, 2006 6:28 pm
Reply with quote

HI ARUN,THE CORECT ANSWER FOR UR QUESTION IS NONE AS PER THE OPTIONS.PLEASE GO THRU TEH EXP OF THE OTEHR ONES GIVEN BY ME.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
Search our Forums:

Back to Top