This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Product and Other Certifications and the fly likes Questions clarification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Questions clarification" Watch "Questions clarification" New topic
Author

Questions clarification

Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
I got these question from a web site they r mock questions ..

1.Which of the following would raise an error if the empID attribute's data type was defined as type ID in the DTD?


a.<name empID="17563">Joe Smith</name>
b.<name empID="ft:17563">Joe Smith</name>
c.<name empID="a17563">Joe Smith</name>
d. <name empID="">Joe Smith</name>



29. Wherever a pants element is allowed in an XML Schema, the XML Schema should also allow a jeans or a shorts element. Which of the following satisfies this requirement?


a.<xs:element name = "pants" type = "pantDetails" />
<xs:element name = "jeans" type = "pantDetails" substitutionGroup = "pants" />
<xs:element name = "shorts" type = "pantDetails" substitutionGroup = "pants" />

b.<xs:element name = "pants" type = "pantDetails" abstract="true" />
<xs:element name = "jeans" type = "pantDetails" substitutionGroup = "pants" />
<xs:element name = "shorts" type = "pantDetails" substitutionGroup = "pants" />

c.<xs:element name = "pants" type = "pantDetails" />
<xs:element name = "jeans" type = "pantDetails" />
<xs:element name = "shorts" type = "pantDetails" />

d.<xs:element name = "pants" type = "pantDetails" abstract="true" />
<xs:element name = "jeans" substitutionGroup = "pants" />
<xs:element name = "shorts" substitutionGroup = "pants" />

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



17. 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.

Multiple Select - Please select all of the correct answers (this question has 2 correct choices).

Please explain answers selected.
What is the anwsers and why .. ?

Thanks
Dhiren
Vidya Ravi
Greenhorn

Joined: Mar 03, 2004
Posts: 14
Regarding Question 1 :

The answer would be "A and D". Recall that ID should be unique in an XML document and should conform to the rules of XML names. since XML naming convention mandates that starting character should be a unicode, colon or underscore, choices A and D are incorrect.
Alternative B looks tempting with the ":" but, it is valid.

Regarding Q 17:

The answer is "A and D". ID and IDREFS allow you to express both one-to-one as well as one-to-many relationships.

I need to look closely at Q29.

Please revert if you need additional clarification.

Thanks,
Vidya
[ June 16, 2004: Message edited by: Vidya Ravi ]
Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
Thanks Vidya for the explainations
Dhiren
 
Don't get me started about those stupid light bulbs.
 
subject: Questions clarification