PrepAway - Latest Free Exam Questions & Answers

Which query will return all documents owned by ‘John Smith’ that have annotations along with the name of t

Annotations on a document are represented using dm_relation objects. On the dm_relation object,
both parent_id and child_id point to a dm_sysobject. The object pointed to by the parent_id is the
document and the object pointed to by the child_id is the annotation. The annotation object is
owned by the person who commented on the document.
Which query will return all documents owned by ‘John Smith’ that have annotations along with the
name of the user that commented on the document?

PrepAway - Latest Free Exam Questions & Answers

A.
SELECT p.object_name, p.owner_name
FROM dm_sysobject p, dm_relation
WHERE relation_name=’DM_ANNOTATE’ AND parent_id=p.r_object_id AND p.r_object_id IN
(SELECT r_object_id FROM dm_sysobject WHERE owner_name=’John Smith’)

B.
SELECT p.object_name, c.owner_name
FROM dm_sysobject p, dm_sysobject c, dm_relation
WHERE relation_name=’DM_ANNOTATE’ AND parent_id=p.r_object_id AND
child_id=c.r_object_id AND p. owner_name=’John Smith’

C.
SELECT object_name, owner_name
FROM dm_sysobject, dm_relation r
WHERE r.relation_name=’DM_ANNOTATE’ AND r.parent_id=r_object_id AND owner_name =
‘John Smith’

D.
SELECT p.object_name, c.owner_name
FROM dm_sysobject p, dm_sysobject c, dm_relation
WHERE relation_name=’DM_ANNOTATE’ AND parent_id=p.r_object_id AND
child_id=c.r_object_id
UNION select object_name, owner_name FROM dm_sysobject WHERE owner_name=’John
Smith’

Explanation:


Leave a Reply