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

Looking for answers for the following


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

New User


Joined: 06 Nov 2007
Posts: 16
Location: Hyderabad

PostPosted: Tue May 12, 2009 10:49 am
Reply with quote

Hi,

I have some questions which I am unable to find the answers.

1. To know the relation between the DB2 tables, which table is used?

2. Using _________function on an indexed column in predicate is not a good practice, as it lowers the query performance.

3. In “Selective SORT”, ___________ is analogous to WRITE.

Do let me know if any one knows the same. Thanks in advance.

Regards,
Mudassir Ansari.
Back to top
View user's profile Send private message
karthi_ind

Active User


Joined: 24 Feb 2004
Posts: 131
Location: Chennai

PostPosted: Wed May 13, 2009 6:00 pm
Reply with quote

The answer for your first question is

Foreign Key

SELECT B.REFTBNAME AS PARENTTABLE,COLNAME
FROM
SYSIBM.SYSFOREIGNKEYS A,
SYSIBM.SYSRELS B
WHERE A.RELNAME = B.RELNAME
AND B.TBNAME = 'table name'
AND B.REFTBCREATOR = 'creator'
AND B.REFTBCREATOR = A.CREATOR

Above query will show the foreign key relation for the table mentioned in the query

Primary key

SELECT NAME
FROM
SYSIBM.SYSCOLUMNS
WHERE TBNAME = 'table name'
AND TBCREATOR = 'creator'
AND KEYSEQ > 0
ORDER BY KEYSEQ ASC


Above query will show the primary key relation for the table mentioned in the query.

I think this is what you are expecting. correct ?
Back to top
View user's profile Send private message
Mudassir Ansari

New User


Joined: 06 Nov 2007
Posts: 16
Location: Hyderabad

PostPosted: Thu May 14, 2009 2:26 pm
Reply with quote

Probably the answer which I came to know is SYSIBM.SYSRELS where it defines the relationship between the DB2 table as in the question it was asking for a table name.
Back to top
View user's profile Send private message
Mudassir Ansari

New User


Joined: 06 Nov 2007
Posts: 16
Location: Hyderabad

PostPosted: Thu May 14, 2009 2:27 pm
Reply with quote

I got the answers for second & third also.

2. Scalar.

3. Release.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 14, 2009 7:37 pm
Reply with quote

Hello,

Quote:
In “Selective SORT”, ___________ is analogous to WRITE.
Who made up the term "selective sort"? RELEASE is analogous to WRITE when using an "Internal Sort".

The word selective is not in the entire current cobol manual. . . I have no idea where some interviewer came up sith this. . .
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 Need answers for some CICS questions Mainframe Interview Questions 1
No new posts Check your Intelligence by finding t... General Talk & Fun Stuff 26
No new posts Endevor Questions with Answers CA Products 4
No new posts Assembler - questions & Answers n... PL/I & Assembler 5
No new posts Stupid Questions with Smart Answers General Talk & Fun Stuff 0
Search our Forums:

Back to Top