Introduction to Resource Description Framework - RDF
The Resource Description Framework otherwise shortly called the RDF is a framework or an infrastructure that is used for exchange of metadata. This framework is also used for encoding and reusing the structured metadata. Resource Description Framework uses XML for imposing the restrictions to enable to follow a structured representation of data so that the data can be exchanged, encoded and reused.
The Resource Description Framework describes the resources available in the internet. RDF has a model to describe these resources. A resource can be said to be anything that is identified by a Uniform Resource Identifier (URI). Resources have properties and properties have values. The values of the properties can be as simple as a text or a string or it can be another resource. A description is a collection of such properties that points to the same resource. The Resource Description Framework has the characteristics such as independence, interchange, scalability, properties, values, and a combination of properties and values that can be said to be statements.
RDF is said to have a characteristic called independence since anybody in the world can create a resource that can be referred by anyone. Since a resource is a URI in the web and that can be created by any person it is said that RDF is independent. The other characteristic of RDF is interchange. The RDF statements if converted to XML can be easily interchanged with other resources. Hence the characteristic interchange. Since any number of resources can be created in the web it is scalable.
The relationship between resources, properties, and values can be best understood when we consider an example for RDF. Consider a person Peter who is the Editor of a Magazine. In this case you can consider the Magazine as a Resource and Editor as the Property and Peter as the value of the property Editor. If the person Peter is an employee of some company say XYZ and that too has to be represented in this RDF model, the value of the resource can point to some other resource which will give information regarding the person Peter. That resource may give information regarding the company of the person and other information about the person. These relationships can be best understood if given in the form of a flow diagram which gives the relationships.
Though the above hierarchical relationships can be best understood by the humans if given in the form of flow diagrams, the machine and the programs cannot understand that form of representation. Hence there is a need for syntax for representing that information so that other applications can understand the information represented and enables the applications to exchange that data with other applications. Hence there is a need for RDF syntax to represent data. This can be best understood with a simple example given below:
ns = "http://www.w3.org/RDF/RDF/" prefix ="RDF"?>
In the above code, the element <RDF:RDF> and </RDF:RDF> is just a wrapper for the XML document as is the case for all the XML documents. The namespace for RDF is given in the first statement of the XML document. Any other elements which have a unique namespace are also given in the document as in the second line of the XML document given above. The element <RDF:Description> is used to initiate the URI of the resource as http://uri-of-Magazine. The element <ME:Editor> is used to represent the property of the Resource in the context of the <RDF:Description>. This property has a value of Peter. The example given above is a simple example in which the relationship of the Resource, Property, and Value are given and the code gives how these are represented in a RDF document.
Consider a case where a Property should refer to another Resource which would give more details about the concerned Resource. The example given below explains this scenario.
ns = "http://www.w3.org/RDF/RDF/" prefix="RDF" ?>
The element <ME:Editor> which gave a value in the previous example now refers to another resource with ID as Edit_Mag. This resource gives more information about the editor such as his name, the email address and the company address. By following these syntax RDF helps in exchanging information about information.
Visit XML Training Material Guide Homepage
Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.Copyright - © 2004 - 2021 - All Rights Reserved.