views:

89

answers:

2

Is it possible to use URI for the subject, predicate and object in RDF or should there be a keywork in atleast one of the triple for eg

David http://www.someuri.com/predicate http://www.someuri.com/object

Is it possible to have this kind of structure in an RDF file or should all the triples be in URI form.

in that case can David be the resource and the property and value be a in form of URI??. Is that possibel???

for example if i have a doctor called david, patient and date of visit are in form of uri

Let the patient URI be "http://www.hospital.com/patients/" and the date URI be "http://www.hospital.com/dateofvisit/" in this case can you please tell me how the RDF document should be created .

+5  A: 

Subject is either a URI or a blank node.

Predicate is always a URI.

Object is either a URI, a blank node or a literal.

David is not a valid URI nor a blank node identifier in any common RDF syntax. You probably want to model it as a URI resource. It doesn't have to be an HTTP URL however, any valid URI will do.

laalto
Presumably, this David is a human being composed of blood bone and personality, and not the letters D a v i and d, therefore its right, in a sense, to model the name as a property of an abstract entity and represent the abstract entity, per convention, with a URL (to allow for node folding)
Simon Gibbs
A: 

Sreenath, In RDF the parts of a triple can be either IRIs (Unicode compatible URIs), literals (strings, integers etc) or 'blank nodes' (a kind of anonymous URLs for temporary references). Your 'keyword' sounds like a shortened form of an IRI - if you define a default prefix for your RDF document, then the keyword should be considered relative to that. If the node is enclosed in quotes, then it is a literal. The only other option is that your triple component is a blank node, which is also a resource locator, but only relative to this document. It would look like this _:David You can find out more here

Andrew Matthews