What is RDF?

RDF--the Resource Description Framework--is a universal format for data on the Web. Using a simple relational model, it allows structured and semi-structured data to be mixed, exported and shared across different applications. RDF data describe all sorts of things, and where XML schemas just describe documents, RDF and OWL schemas ("ontologies") talk about the actual things. This gives greater re-use. Where XML provides interoperability within one application (e.g. bank statements) using a given schema, RDF provides interoperability across applications (eg import your bank statements into your calendar). RDF started as framework for metadata; providing interoperability between applications that exchange machine-understandable information on the Web. RDF emphasizes facilities to enable automated processing of Web resources and as such provides the basic building blocks for supporting the Semantic Web. RDF metadata can be used in a variety of application areas; for example: in resource discovery to provide better search engine capabilities; in cataloging for describing the content and content relationships available at a particular Web site, page, or digital library; by intelligent software agents to facilitate knowledge sharing and exchange; in content rating; in describing collections of pages that represent a single logical "document"; for describing intellectual property rights of Web pages, and in many others. RDF with digital signatures will be key to building the "Web of Trust" for electronic commerce, collaboration, and other applications.

RDF and Perst

Perst object-oriented database makes it possible to make persistent statically typed objects (Java or C#). It provides transparent way for storing/fetching such objects. But many applications today has to deal with more flexible data represented in XML. In some cases it is possible to convert this data in application objects but in most cases it is not possible, because the main idea of using XML data representation is extending flexibility and been able to work with structured data which format is not statically known at application compilation time.

This package allows store such data in Perst database and efficiently search/retrieve this data. Now most of commercial databases provides special XML extensions, modules or utilities allowing to deal with XML data which becomes more and more popular. Perst is able to manipulate with XML data more efficiently than relational database systems, since it can directly handle references, nested and recursive data structures.

Generally underlying data model is based on graph where vertices corresponds to objects and their field values and edges - field names (see attached file). So each object (XML element) is represented as set of properties. Property can be of string, datetime, numeric, BLOB or reference type. For each type of property separate index exists. So it was not intention to precisely store XML document model (attributes, elements, values, comments, ...) - for example attributes and subelements are treated by database in the same way.

This package doesn't allow to modify stored data. Each time you have to update an object, new version of the object is created. So the system maintains linear version history for each object

RDF data search capabilities

This package provides some kind of QBE (Query-By-Example) search. User specifies RDF element which properties are matched with the properties of the objects stored in the database. The following types of search are supported:

XML server

XML server class allows to store RDF data represented in XML format and search them using QBE-like queries. Input of XmlServer class are XML documents which root element should be either <vr:store>, either <vr:find>. First one allows to store one or more objects, and second one - specify one of more search patterns (result is produced independently for each pattern). Result of find request is document containing <vr:result> root element which siblings are RDF objects matching search patterns. Pattern XML element can have the following optional attributes:

AttributeType of valueDescriptionDefault value
rdf:aboutObject URISpecify search pattern for object URINone
vr:beforeTimestampOnly the latest versions before the specified timestamp will be inspectedLatest version search kind is used
vr:afterTimestampOnly the oldest versions after the specified timestamp will be inspectedLatest version search kind is used
vr:allBooleanIf value of this attribute is "true", then search will be performed in all versions, otherwise only in the latest version in version historiesLatest version search kind is used
vr:depthIntegerSpecifies depth of dumping object structure. The system will expand in XML dump all objects which are part of the containing object (URI starts with the URI of the containing object) or object which depth from the root object doesn't exceed specified0

Please look at the example of storing and searching RDF data. To start example, please use "run.bat" script in rdf/samples directory.