




 
(sql:def-view-class vehicle
(standard-db-object standard-kb-object)
((vehicle_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 
vehicle
 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 (Windows version) - 6 Dec 2011