Book a Demo

Author Topic: Representing databases in activity diagrams  (Read 12086 times)

DaveMere

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Representing databases in activity diagrams
« on: July 25, 2006, 02:35:30 am »
Hi there,

I'm creating an activity diagram and I'd lik to represent an existing database in this. I've already imported my ER diagram into a class diagram and this is what I'd like to show as an object in my activity. But the datastore object is a composite diagram, which seems more general that what I'm after.

Can I represent my class diagram in my activity diagram? Or is the composite sufficient?

JohnWSaundersIII

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Representing databases in activity diagrams
« Reply #1 on: July 25, 2006, 09:51:57 am »
Is it your database which participates in this activity, or is it a data layer class representing the database which is the participant?

Surely it's not the database itself which participates!

John
John Saunders

DaveMere

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Representing databases in activity diagrams
« Reply #2 on: July 27, 2006, 03:13:20 am »
Erm?

The database participates in as much as it receives and outputs information throughout the activity. I'd like to show this on my activity diagram. I used the datastore object to do this, and now would like to detail it's relational structure also.

For this, the datastore give me the option of a composite diagram, with classes. I'd like to use a data model, with tables.

I suppose I could be missing something here, but it seems logical to represent the database in this way. Do you think not?

thanks, Dave

JohnWSaundersIII

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Representing databases in activity diagrams
« Reply #3 on: July 27, 2006, 03:38:23 am »
Yes, I think not.

"The database" may be thought of as a passive store of data, or "the database" may be thought of as an external entity, outside of your system. It can also be thought of as your data layer, inside of your system, through which you communicate with "the database", outside of your system.

I suggest that you represent your datalayer in your activity diagram, because it is inside of your system, whereas "the database" is outside of it.

John
John Saunders

DaveMere

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Representing databases in activity diagrams
« Reply #4 on: July 27, 2006, 04:18:25 am »
Perhaps I've not been clear enough!

I'm modelling a business process, not designing any sort of software. I'm trying to represent the process flow, and how each activity uses and outputs data. Throughout this process a database is used, and is added to and read from as the process continues. So for these purposes I assumed a datastore object with an associated ER diagram would be sufficient.

Datalayers as I understand them are software modules used to interact with your database. Wouldn't a datalayer be used in say a class diagram? That level of detail isn't really required at this stage.

As well as this, it's an Access db, so the datalayer is kind of hidden from me.

Does this make things any clearer?

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Representing databases in activity diagrams
« Reply #5 on: July 27, 2006, 05:27:11 am »
For representing such use of database I would use a partition.
What do others think of it (debate welcome)?
Jan 'Bary' Glas

DaveMere

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Representing databases in activity diagrams
« Reply #6 on: July 27, 2006, 06:23:16 am »
That's interesting. I'm already using partitions as it happens, as there are multiple user groups working in this process. I suppose a third partition for "database" would work, but what would it contain? A datastore object and that's all?

I would have imagined that representing a database in an activity diagram was a fairly common event though. What is the standard approach for this? As Bary says, debate welcome!

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Representing databases in activity diagrams
« Reply #7 on: July 27, 2006, 06:38:35 am »
Partition in my case describes extrenal (database) system. A secondary actor in fact.
We may always use an object and define dependencies (or other) e.g. in Ericsson-Penker notation.

Or change point of view and describe what entities are in that database and not the database itself.
Jan 'Bary' Glas

JohnWSaundersIII

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Representing databases in activity diagrams
« Reply #8 on: July 27, 2006, 11:02:59 am »
Yes, knowing that you're talking about using an activity diagram to model a business process makes it clearer.

I'm only guessing here because I don't do business process modeling. But I guess that in your model you want to model that some processes produce some data (an object in the diagram) and that you want to send the data to "the database"?

If so, then you should use the data store element, not something you've reverse engineered from an ER diagram. The data store element is meant for this purpose.

If you want to more closely identify it with something from your class model (which seems to be mixing metaphors, so to speak), then you should right-click the datastore node and choose (Advanced Settings->Instance Classifier). Then choose your class from the list.

Am I correct in assuming that you only send object flows in and out of "the database"?

John
John Saunders

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Representing databases in activity diagrams
« Reply #9 on: July 27, 2006, 03:38:09 pm »
With all possible respect to John Saunders.  Let me try to put this a bit more simply.

The structure of the database (ER) is of NO concern to the business process.  BPM's concern is to decide that there is a need to persist certain business information at points in processes.  It should decide what this information is as a business object, e.g. "invoice","claim", "ticket" etc not as a set of tuples dictated by a database structure.

AS such, the "database" at the business process level can therfore be completely represented as an amorphous object to wit a datastore element.

WAPRT Bary.  At business process level the "database" is part of the system.  In fact there are no "external" elements at the BP level.  Now before you all start...
At the BP level anything placed in the model is part of the "system of concern" (unless the model is fundamentally wrong).  Externality arises only when the structure and composition of the "system of project" is subsetted out of the s.o.c.

Here's a small sample.  
http://sargasso.sphosting.com/Datastores.htm

bruce
« Last Edit: July 27, 2006, 07:14:57 pm by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

JohnWSaundersIII

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Representing databases in activity diagrams
« Reply #10 on: July 27, 2006, 03:42:56 pm »
Thanks, Bruce, since I don't do BPM, I didn't know how to describe it. You've expressed exactly what I thought the answer would be: something abstract.

BTW, for some reason, your example image doesn't render for me within the forum. Cutting-and-pasting the URL of the image in to the browser address bar works fine, though. Thanks for the example.

John
John Saunders

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Representing databases in activity diagrams
« Reply #11 on: July 27, 2006, 03:49:56 pm »
Quote


Completely off-topic, but am I the only one who can never see Bruce's diagrams? I am using Firefox 1.0.7 and I don't think I have any unusual settings.

Edit: No, it isn't just me! (Simulposted with John)
« Last Edit: July 27, 2006, 03:54:41 pm by KP »
The Sparx Team
[email protected]

JohnWSaundersIII

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: Representing databases in activity diagrams
« Reply #12 on: July 27, 2006, 03:51:51 pm »
See my reply right before yours. I can't see them either.

John
John Saunders

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Representing databases in activity diagrams
« Reply #13 on: July 27, 2006, 04:57:01 pm »
Quote

Completely off-topic, but am I the only one who can never see Bruce's diagrams? I am using Firefox 1.0.7 and I don't think I have any unusual settings.

Edit: No, it isn't just me! (Simulposted with John)
The rendering of diagram images on the form is like the Beatles "Her majesty"  - it "varies from day to day".

For me, mostly they're OK, but sometimes they aren't (the same diagram that is).  Since there's no place to co-locate them on the server, there are more variables in play.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Representing databases in activity diagrams
« Reply #14 on: July 27, 2006, 06:01:50 pm »
Well I don't see any of them until I cut and paste the image into the address bar, press Go and then press Back. The diagrams then magically appear in the original message, presumably because Firefox has cached them.
« Last Edit: July 27, 2006, 06:02:33 pm by KP »
The Sparx Team
[email protected]