NextPrevUpTopContentsIndex

4.2.1 Example

(sql:def-view-class car 
               (standard-db-object standard-kb-object)
               ((car_no :db-kind :key)
                (keeper)
                (owner :db-kind :join
                       :db-info (:home-key :keeper
                                 :foreign-key person_id
                                 :retrieval :deferred
                                 :join-class person))))

defines a database class car where the person object in the keeper slot is retrieved from the person table in the database using the value of the keeper slot as key, only when queried. In the list of superclasses, standard-kb-object should appear after sql:standard-db-object .


KnowledgeWorks and Prolog User Guide (Macintosh version) - 11 Jul 2006

NextPrevUpTopContentsIndex