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 QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm


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