IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > DB2 XML > ... > Solutions > Rules
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
Rules
Added by db2xml42, last edited by db2xml42 on Oct 30, 2008  (view change)
Labels: 
(None)

Storing Rules in pureXML

Rules can be expressed in XML. One of the rules notations is called RIF (Rule Interchange Format). The XML notations for rules are for interchanging rules between systems. Increasingly XML interchange notations are used for storage too providing:

  • Agile development of systems -
    • More people understand the storage model as it matches the external message exchange model
    • The internals of the system match the externals more closely
    • The designs are quicker to implement
  • Development of agile systems -
    • Schema evolution of the rules and other changes are much easier to handle
    • There are plenty of XML tools that can be applied to the stored data

In particular, being able to store and query RIF rules in XML, makes it easier to build systems that manage collections of rules.


Storing and Querying RIF in pureXML

For a presentation on storing RIF Basic Logic Dialect rules in an XML database (as XML documents in a single column of type XML), please see these charts

For a live demonstration of RIF Basic Logic Dialect rules stored in an XML database (as XML documents in a single column of type XML), please follow the following steps:

  • go to Industry Formats and Services with pureXML
  • select View Demo
  • select RIFBLD after scrolling down.
  • select Query in the Data Management section of the demonstration
  • view the rules stored in an XML database - in particular the car dealer scenario rules, by highlighting the rule and clicking retrieve
  • select here in the text Click here for a list of sample queries and try executing some of the provided queries (they are XQueries)
  • select Insert in the Data Management section of the demonstration to insert your own RIF rules
  • select Query in the Data Management section of the demonstration to view and query your rules stored in the XML database

As well as supporting the insertion and querying of RIF rules, the demonstration also does the following:

  • Exposes Atom Feeds - so users of the system can watch out for new rules being added to the system, or simply view the stored rules through a regular feed reader. Exposing the rules as feeds also means they can be used in mashups more easily.
  • Exposes a set of RESTful Services and Web Services enabling access from a variety of clients to the stored rules.

More Information

  • Contact malaika at us dot ibm dot com, if you'd like a pureXML industry bundle for RIF, to help you get started with storing, indexing and querying RIF.


 
    About IBM Privacy Contact