to amio(阿苗):
当然不是所有的系统都把数据库作为actor,特别是数据库应用程序中不太可能把数据库作为actor。但也不是绝对的,这在许多前人的经验中也是这么强调的。在数据库仅仅只作为数据存放之用的时候,也就是说case只使用数据的时候,数据的改变引发case的活动时,我觉得数据库可以作为actor看待。我现在做的系统中数据库的作用就是这样的,所以先出口了。我也不知道这么处理对不对。
to hongliqiu(在火中):
数据库一般是不会作为一个Actor的。
下面是规范原文描述(99-06-08)节选,附我的翻译及理解,供参考。
3.55 Actor/活动者
3.55.1 Semantics/语义
An actor defines a coherent set of roles that users of an entity can play when interacting with the entity. An actor may be considered to play a separate role with regard to each use case with which it communicates.
/一个活动者定义了一种角色,一个实体的用户在和这个实体交互时可以扮演这种角色。可以认为,一个活动者扮演一个独立的角色,这个角色和与其交互的每一个用例都是相关的。
3.55.2 Notation/符号
The standard stereotype icon for an actor is a “stick man” figure with the name of the actor below the figure. An actor may also be shown as a class rectangle with the keyword «actor», with the usual notation for all compartments.
/标准型中表示一个活动者的图标是一个下面标记了名称的“木人”图形。一个活动者还可以显示为一个带有关键字<<actor>>的类框,具有通常的间隔符号。