mulgara - semantic store

skip navigation



Views are special models made up of one or more models or views. The advantages of views include:


Creating Views

You can create views by:

  1. Using the iTQL create command, creating a model of type This creates the view, plus a view definition model.
  2. Loading RDF that represents the set of models for the view, into the view definition model. For example, rmi://

Views are a symbolic model expression equivalent to an iTQLTM from clause. Querying a view queries all of the models to which the view refers. When the URI of a view occurs in the from clause of a select command, the view's model expression is substituted in place of the view URI when the query is processed.

Any modifications applied to the view (by using insert, delete or load commands, for example) only affect the view's definition and have no effect on the models to which the view refers.

Since a view is a symbolic representation of a combination of models, any modifications to models to which the view refers are visible immediately via the view.

Here is an RDF example, that when loaded into the view definition model, defines the set of models for a view:

<?xml version="1.0"?>
<!ENTITY rdf ''>
<!ENTITY mulgarav ''>
<!ENTITY server 'rmi://'>
<rdf:RDF xml:lang="en"
<mulgarav:Union rdf:about=""
<mulgarav:model rdf:resource="&server;#model1"/>
<mulgarav:model rdf:resource="&server;#model2"/>
<mulgarav:model rdf:resource="&server;#model3"/>
<mulgarav:model rdf:resource="&server;#model4"/>
<mulgarav:model rdf:resource="&server;#model5"/>

Which generates the following triples: 'true' rmi:// rmi:// rmi://
rmi:// rmi://
rmi:// rmi://
rmi:// rmi://
rmi:// rmi://

The RDF is equivalent to the following from clause:

... from <rmi://> or
(<rmi://> and
<rmi://>) or
(<rmi://> and
<rmi://>) ...

If the above RDF is loaded into the view definition model, rmi://, then the following from clause is equivalent to the preceding one:

... from <rmi://> ...


Querying View Definitions

You can query the definition of a view by adding ?def to the view name. For example:

select $s $p $o
from <rmi://>
where $s $p $o;

The ?def query string can be used in the model URIs that are referenced by a view definition. That is, views can reference other views.

Note - Since views can reference other views, make sure you don't define views that reference each other.


Limitations of Views

The current limitations of views are as follows:

Valid XHTML 1.0 TransitionalValid CSS 3.0!