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
 

 

Choose the Best in ON DELETE question

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Choose the Best in ON DELETE question
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    Post subject:
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    Post subject: Re: Choose the Best in ON DELETE question
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    Post subject:
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    Post subject: Re: Choose the Best in ON DELETE question
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    Post subject: Re: Choose the Best in ON DELETE question
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts Delete record or Reset RC code using ... mpawan Compuware & Other Tools 4 Tue Jul 26, 2016 3:52 pm


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