This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Product and Other Certifications and the fly likes Mock exam questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Mock exam questions" Watch "Mock exam questions" New topic
Author

Mock exam questions

Vasudha Deepak
Ranch Hand

Joined: Mar 15, 2002
Posts: 86
1) Processing instructions can be used for all of the following EXCEPT: (Two Correct answers)
a)a method for passing the name of a stylesheet.
b)Use ID and IDREF attributes to represent bi-directional relationships.
c)Copy the data in a relationship into the element for the row containing the foreign key.
d)Copy the data in a relationship into the element for the row containing the primary key.

2) A developer needs to convert records from a relational database into XML. Each row in a table is represented as an element in the document How can the developer represent relationships in the database?

a)Use ID and IDREF attributes to represent unidirectional relationships.
b)Use ID and IDREF attributes to represent bi-directional relationships.
c)Copy the data in a relationship into the element for the row containing the foreign key.
d)Copy the data in a relationship into the element for the row containing the primary key.

3) A development team has moved an XML application from the development server to the staging server. While testing the XML application on the new server, the application returns a message indicating that there is an "invalid entity reference" error in the DTD. The MOST likely cause of this error is:
a)changes to the XML transformation between technical manual and ordering DTDs or XML Schemas.
b)a change to the XML rendering rules for technical manuals.
c)an enhancement to the DTD or XML Schema for technical manuals.
d)adjustments to the part number linking approach.

Single Select - Please select the best answer (one and only one choice must be selected).

Please suggest answers for these questions.
Thanks,
Vasudha


IBM Certified Developer -XML and Related Technologies(141)<br />SCJP2 SCWCD
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
Vasudha,
I donot have enough knowledge to answer them on a per-question basis.
I only thing what i think i know is about the uni-directional or bi-directional stuff w.r.t ID and IDREF attributes.
The following is what i think on this -
An element with an ID type attribute doesn't have any knowledge of whom it is related to. An element with an IDREF (or IDREFS) type attribute has knowledge of the "ID"ed element(s) its connected to. Hence we can model one-one(many)relationship here, but i think this will be uni-directional i.e., the element with IDREF only has the knowledge of the element its related to and its not the other way round. The above stuff is my personal feeling about how things are.
I look forward to someone to come forward and do a detailed autopsy on each of the questions and try to explain what is the meaning of each. That would help us a lot, mainly on these kind of domain-knowledge related questions (like moving things from appServer to stagingServer, etc.)
Vasudha Deepak
Ranch Hand

Joined: Mar 15, 2002
Posts: 86
Yes,in the second question I am sure the a) would be one of the choices,ie unidirectional relationship between ID/IDREF,but I can't figure out the second correct answer.
Looking forward to more responses.
Thanks,
Vasudha
Anitha Lingam
Ranch Hand

Joined: Apr 21, 2002
Posts: 38
For question 1,
Processing Instructions can be used to pass the name of the stylesheet.
For Ex:
<?xml-stylesheet href="classic.xsl" type="text/xml"?>
is a processing instruction which is used to pass the name of the stylesheet.
check this link for more details
http://www-106.ibm.com/developerworks/xml/library/x-wxxm2/#h1.2
so, a) cannot be the right answer.
Awaiting more responses.
Siva shanmugam
Greenhorn

Joined: Jul 18, 2002
Posts: 15
For Q2
C can also be a correct ans
For Example if u have 2 tables in database like
User Tbl
--------
UsrId primarykey,
UsrName ,
AddrId foreignKey
Addr Tbl
--------
AddrId primaryKey,
AddrDet

If you create an Xml file for the user tbl,the structure can be like this
<?xml...?>
<records>
<Row1>
<UsrId>1</UsrId>
<UsrName>test</UsrName>
<AddrId>
<AddrDet>234,stree</AddrDet>
</AddrId>
</Row1>
<Row2>
<UsrId>2</UsrId>
<UsrName>siva</UsrName>
<AddrId>
<AddrDet>234,stree</AddrDet>
</AddrId>
</Row2>
</records>
In the above case we have copied address details into User detail element.So "C" is my choice.But "D" is meanigless bcase
you cann't include the user details into address details and its against an RDBMS rule also.
Vasudha Deepak
Ranch Hand

Joined: Mar 15, 2002
Posts: 86
Thanks for the details.Well in that case answer a) and c) are the correct choices for question #2.
Anitha,you are right that PI's can be used for passing stylesheet name,however I was referring to option a) for question # 2.
But I still can't fgure out how the other three options are related to PI's (Question#1).
Thanks,
Vasudha
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
The only reasonable guess i can see for the third question is the option of adjustments to the part-linking approach.
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1167
Jayadev,
I'm not sure about the correct answer here but I found the exact same question with different set of answers in the original IBM sample test at http://viktor99.virtualave.net/IBM141a.html question #53.
Cheers,
Dan


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
Yeah! That was the same question, but with slightly different options; The outright possibility there was some oversight in migrating some of the entity references. In the present scenario, i guess the only option wherein things can effect the invalid entity reference kind of stuff is the part linking approach (i have to admit that i'm not very familiar with Xlink and Xpointer, but this is my hunch )
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
One more thing is related to the database stuff. I'm still not very comfortable with Siva's answer. I have some questions lingering in my mind. I'll put them here. Please comeback with your answers.
================================================
Siva's Example ---
User Tbl
--------
UsrId primarykey,
UsrName ,
AddrId foreignKey
Addr Tbl
--------
AddrId primaryKey,
AddrDet
================================================
I'm thinking of something like shown below -
UserTable ----
=========
UserID (primary key)
Name
OrdersTable ----
============
UserIDField (foreign key)
ItemOrdered
Now, in the above scenario, wouldn't i like to have the row information in the table holding the primary key to include the stuff of the row info of the corresponding table with the foreign key i.e, when i mention an XML element for the above scenario, i would like to have something like -
<Orders>
<row1>
<UserID>12345</UserID>
<Name> Jayadev </Name>
<ItemOrdered> XML Book </ItemOrdered>
</row1>
</Orders>
I feel that this scenario also makes sense, but i'm doing something exactly opposite and hence i'm copying the data of the relationship into the element of the row containing the primary key. I think it all depends on how you define your primary and foreign keys. Hence i still cannot differentiate b/w options "C and D".
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
One more thing is related to the database stuff. I'm still not very clear with Siva's answer. I have some questions lingering in my mind. I'll put them here. Please comeback with your answers.
================================================
Siva's Example ---
User Tbl
--------
UsrId primarykey,
UsrName ,
AddrId foreignKey
Addr Tbl
--------
AddrId primaryKey,
AddrDet
================================================
I'm thinking of something like shown below -
UserTable ----
=========
UserID (primary key)
Name
OrdersTable ----
============
UserIDField (foreign key)
ItemOrdered
Now, in the above scenario, wouldn't i like to have the row information in the table holding the primary key to include the stuff of the row info of the corresponding table with the foreign key i.e, when i mention an XML element for the above scenario, i would like to have something like -
<Orders>
<row1>
<UserID>12345</UserID>
<Name> Jayadev </Name>
<ItemOrdered> XML Book </ItemOrdered>
</row1>
</Orders>
I feel that this scenario also makes sense, but i'm doing something exactly opposite and hence i'm copying the data of the relationship into the element of the row containing the primary key. I think it all depends on how you define your primary and foreign keys. Hence i still cannot differentiate b/w options "C and D".
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
The above stuff got posted twice by mistake. Please ignore one of them.
Svetlana Petrova
Ranch Hand

Joined: Sep 26, 2002
Posts: 50
Hi,
For answer to the first question see http://viktor99.virtualave.net/IBM141a.html
Q12. From there you may figure out that the right answers can be - C and D, because A and B allow PIs.
As to the 3d question, I believe IBM messed up a little bit there in this version of their test.
You might have noticed there is exactly the same question in this test version, but with different set of answers that make much more sense:
"A development team has moved an XML application from the development server to the staging server. While testing the XML application on the new server, the application returns a message indicating that there is an "invalid entity reference" error in the DTD. The MOST likely cause of this error is:


a) The DTD was not compiled on the new server, and the parser is failing to recognize the entities in the XML document instance.

b) The DTD references external entities that were not migrated.

c) The DTD needs to be converted to an XML Schema that uses tokens instead of entities.

d) The parser is incompatible with the XML application.

e) The application must be recompiled on the new server.
"

They've also screwed up this "question" (if there is a qustion here at all):
22)
Consider the following XML data:
<book>
<title>XML Certification Guide</title>
<chapter>
<title>Prologue</title>
<section>
<title>Introduction</title>
<content>
...
</content>
...
</chapter>
...
</book>



a) <xsl:template match="/title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="."/></p>
</xsl:template>

b) <xsl:template match="//title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="."/></p>
</xsl:template>

c) <xsl:template match="title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="@title"/></p>
</xsl:template>

d) <xsl:template match="title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="self"/></p>
</xsl:template>


Single Select - Please select the best answer (one and only one choice must be selected).



By now, I've got 37 correct answers out of 44.
Take care,
Svetlana.
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
Svetlana,
I think the question (22) is appropriate. The idea there is to capture the titles using the stylesheet. If you look at the options given -
a) <xsl:template match="/title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="."/></p>
</xsl:template>
b) <xsl:template match="//title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="."/></p>
</xsl:template>
c) <xsl:template match="title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="@title"/></p>
</xsl:template>
d) <xsl:template match="title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="self"/></p>
</xsl:template>
"a" might have been right if mentioned as
<xsl:template match="title">
"b" is the right choice.
"c" might have been right if mentioned as
</xsl:text><xsl:value-of select="."/>
"d" might have been right if mentioned as
<xsl:value-of select="self::*"/>
<xsl:value-of select="self"/> This looks at "self" as a node and not the axis.
Please correct me for any mistakes.
Thanks.
Siva shanmugam
Greenhorn

Joined: Jul 18, 2002
Posts: 15
Hai Jayadev
this is my explanation for your reply
UserTable ----
=========
UserID (primary key)
Name
OrdersTable ----
============
UserIDField (foreign key)
ItemOrdered
Now, in the above scenario, wouldn't i like to have the row information in the table holding the primary key to include the stuff of the row info of the corresponding table with the foreign key i.e, when i mention an XML element for the above scenario, i would like to have something like -
Copy the data in a relationship into the element for the row containing the foreign key.
<Orders>
<row1>
<UserID>12345</UserID>
<Name> Jayadev </Name>
<ItemOrdered> XML Book </ItemOrdered>
</row1>
</Orders>

In the example you have created an xml file for the orders table.
The related data for the UserIdField is in UserTable,So we are copying the info related to the UserId from UserTable
and inserted in the place of foreign key.
If i am correct you are also referring the same answer "C".
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
Siva,
Yes. I think we are both referring to the same stuff. The terminology is a little confusing for me there. Thanks for the clarification.
Regards,
Jayadev.
Svetlana Petrova
Ranch Hand

Joined: Sep 26, 2002
Posts: 50
Hi Jayadev,
I also could assume what the question meant to be. But show me the "question", please. It's not even formed, if you look at the example closely.
Below is an exact excerpt from the test.
"22)
Consider the following XML data:
<book>
<title>XML Certification Guide</title>
<chapter>
<title>Prologue</title>
<section>
<title>Introduction</title>
<content>
...
</content>
...
</chapter>
...
</book>
a) <xsl:template match="/title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="."/></p>
</xsl:template>
b) <xsl:template match="//title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="."/></p>
</xsl:template>
c) <xsl:template match="title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="@title"/></p>
</xsl:template>
d) <xsl:template match="title">
<p><xsl:text>Title: </xsl:text><xsl:value-of select="self"/></p>
</xsl:template>
Single Select - Please select the best answer (one and only one choice must be selected). "
It's all about that IBM is not paying enough attention to this, new, version of the sample test. I've noticed already 3 or 4 malformed questions, unfortunately.
Thanks,
Sveta.
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
I have to agree with you in saying that IBM is not paying enuf attention in framing the questions. BTW, i tried to take the following test -
http://viktor99.virtualave.net/IBM140a.html
eventhough it is no longer valid, just to have a look at the nature of questions. The options are very close and lot of my brain cells must have died in an effort to make out the right choice Just mananged to pass that with 25/40. I hope that test141 will be a little different from this
 
jQuery in Action, 2nd edition
 
subject: Mock exam questions
 
Similar Threads
Question to Svetlana Petrova and to those who know these issue
Questions clarification
Sample test question
IBM Mock Exam: 2 Information Modeling questions
Sample test question