Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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
1  
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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.