I think Matthew Hutchinson wrote: > > Thanks for all the help so far, the more I use Jess the more I am impressed > - with the product and the support. Anyway, my question:
Thanks! > > I have a whole bunch of data relating to street addresses (suburb names, > street names etc.) which sits quite happily in a database. However, I want > to start using these database records as facts (or rules, not sure which > yet) in Jess and match some incoming information. Tu cut a long story short, > is it bad programming and design to simply put my whole database into Jess? > I want to use Jess for its intended purpose - it just seems like a massive > overhead to have what be a massive database in Jess. Is there a way to use > both - keep most of the data in the database but somehow still utilize jess? > what do people do in this situation? It's not bad style, but you do have to be smart about it. If it's small enough for the whole thing to fit in working memory, then go ahead and load it up, but try to load it "on the bottom" -- i.e., load it first, and since it's unchanging data, mention those facts first in all the rules that use it. If it's too big for that, or if it might become too big, then you can look at bringing the data in "on demand." Many people have used backward chaining for this. There's a tool called the "Fact Storage Provider Framework" that does this automatically for JDBC databases. Look on the "User Contributions" page at the Jess web site. It's a nice piece of work. Remember that backward chaining lets a rule fire when some other rule is trying to match a fact, but that fact is missing. The FSPF supplies some rules that are triggered by backward chanining and go off and pull the required facts out of the database, as needed. Then ddata that's never used is never loaded, and data that *is* needed is loaded just once. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
