Programming by demonstration (PBD) systems offer an advantage of easy programming. However, they have
difficulty in inferring user intent behind user actions, because of ambiguity of those actions. This paper
describes a novel approach "action management" to the inference problem. It is based on an idea that PBD
systems are able to properly determine user intent by making users demonstrate only non-ambiguous actions.
With the action management approach, a PBD system for creating database queries, called DADIE, can
correctly infer user intent even in creating complex queries, such as join, group-by and subquery.