Hello to all, I am a newbie to Experts System trying to develop a domain knowledge for accessing mutli-databases. I am trying to use frame representation as the formalism. ;------------------------------------------------------ ; For example a simple Ontology between Mammal, Persons and Student: ;------------------------------------------------------ (deffacts ontology ; class hierarchy (class Things) (class Mammals) (class Persons) (class Students) (subclassOf Students Persons) (subclassOf Persons Mammals) (subclassOf Mammals Things) ; slot hierarchy (slot Attribute) (slot Name) (slot LastName) (slot ID) (slot StudentID) (subslotOf Name Attribute) (subslotOf LastName Name) (subslotOf ID Attribute) (subslotOf StudentID ID) ) ;------------------------------------------------------; The facts for db schemas ;------------------------------------------------------(deffacts schemas (hasTable db1 Students) (hasField db1 StudentID) (hasField db1 LastName) (hasTable db2 Persons) (hasField db2 ID) (hasField db2 Name) (phase 1) ) ;------------------------------------------------------; The rules for representing transitivity and reflexivity ;------------------------------------------------------(defrule class-transitivity (subclassOf ?x ?y) (subclassOf ?y ?z) => ; (facts) (assert (subclassOf ?x ?z))) (defrule class-reflexivity (class ?x) => (assert (subclassOf ?x ?x))) (defrule slot-transitivity (subslotOf ?x ?y) (subslotOf ?y ?z) => (assert (subslotOf ?x ?z))) (defrule slot-reflexivity (slot ?x) => (assert (subslotOf ?x ?x))) Although I could use defquery to determine the generalisation and specialisation relationship between each concepts so that all related data in the databases (that have generalisation or specialisation relationship) can be retrieved. For example; for (defquery search (declare (variables ?X)) (subclassOf ?X ?Y)) ?X will always represent the specialisation class; ?Y the generalisation class. But how to do all these using unordered facts since the above example has been done using order facts. -------------------------------------------------------(deftemplate Thing) (deftemplate Mammal extends Thing (slot gender)) (deftemplate Person extends Mammal (multislot name)) (deftemplate Student extends Person (slot ID)) ... I find some on now relationship can be detemined now??? Please advise as I am very new here to expert system. thanks alvin __________________________________________________ Do You Yahoo!? Yahoo! Photos -- now, 100 FREE prints! http://photos.yahoo.com --------------------------------------------------------------------- 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] ---------------------------------------------------------------------