On 12/15/11 11:25 AM, Manish Hardasmalani wrote:
Hi,

This is related to Defining User Defined rules in Virtuoso, i need
help related to below requirement.
Below is my exact requirement :

A firm may want to know what line of business among many that the firm
deals with, does the customer do business with. For example, these
rules could be



(?client :hasProduct :product1) =>  (?client :isWithLOB :lob1)

(?client :hasProduct :product1 . ?client :hasProduct :product2) =>
(?client :isWithLOB :lob2)

How could we express these in rule sets?

For now, you can use SPARQL CONSTRUCT, later we'll be delivering Datalog/Prolog like rules.

Your horn rule above is on a horizontal plane. Here is the same rule on a vertical plane courtesy of SPARQL:

CONSTRUCT {?client :hasProduct :product1}
WHERE {?client :isWithLOB :lob1}

Basically, you can materialize the triples from the above as part of an ETL routine via:

INSERT INTO <LOBGraph>
{?client :hasProduct :product1}
WHERE {?client :isWithLOB :lob1} .

HTH

Kingsley

Thanks,
Manish Hardasmalani

------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.
But none more important than the need to reduce IT complexity
while improving strategic productivity.  Learn More!
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
Virtuoso-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-users



--

Regards,

Kingsley Idehen 
Founder&  CEO
OpenLink Software
Company Web: http://www.openlinksw.com
Personal Weblog: http://www.openlinksw.com/blog/~kidehen
Twitter/Identi.ca handle: @kidehen
Google+ Profile: https://plus.google.com/112399767740508618350/about
LinkedIn Profile: http://www.linkedin.com/in/kidehen






Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to