retrieves information from the database.
void(Term) (x) Term to be matched with database entries
This predicate retrieves information from the database by matching its argument with any term stored in the database. Until the DATABASE keyword is implemented, you have to use this or clause to make a non-destructive database query. Database acts just like retract (), except that it does not remove the entries. You may invoke indefinite loops by using a database(X), ..., assertz(X),fail. construct.
asserta(hello), asserta(world), database(X), write(X),nl, fail.
No runtime errors.
prolog-process, client-server, object
asserta , assertz , retract , retractall , clause , listing