Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm just learning about use-case analysis and use-case diagrams and am a little confused whether or not the MySQL database of a web app should be considered an actor.

Is the databased considered outside of "the system" or my application, because it is its own server, most probably on another physical machine?

On the other hand, the database in a basic web application won't ever initiate a use case.

share|improve this question
I'd say "No", but time can be an actor (triggers batch jobs for example). – Marjan Venema May 27 '12 at 9:19
That's an interesting point. …wouldn't the actor be the batch job itself and time simply its trigger? – bernk May 27 '12 at 9:34
I would always keep (batch) jobs as processes. Yes one process may trigger/start another but the ultimate actor is always the one for/by whom the initial process was initiated. If you add a task scheduler into the mix, time could indeed simply be a trigger, and the scheduler the actor, but for whom is the work being done? Who schedules the jobs? That would be a database administrator. So, I'd have the database scheduler as a process and time as the actor on behalf of the dba who would otherwise have to start the job manually. – Marjan Venema May 27 '12 at 12:54
up vote 5 down vote accepted

The database is an actor when it takes independent action -- triggers and jobs mainly. It is not a actor when it it is simply responding to CRUD commands.

share|improve this answer
Thanks! That makes it perfectly clear. – bernk May 27 '12 at 9:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.