wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes UML Sequence Diagram:  database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "UML Sequence Diagram:  database" Watch "UML Sequence Diagram:  database" New topic
Author

UML Sequence Diagram: database

Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
How or what icon do we use to represent a database?

Lets say, an object calls a Select statement on that database? Is it a common rectangle? or an actor (stick person)?
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
A typical icon would be a drum - see Figure 2 at http://www.agilemodeling.com/artifacts/sequenceDiagram.htm

I don't think it's standardized, but everyone I know would recognize it.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
Yes, I also use the drum in all of my Program Flow Diagrams, for the database.

However, I am strictly required to be UML compliant - UML 2.x or earlier.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
UML actually allows for custom icons to be used. So, as far as I know, you would be "strictly UML compliant" even if you used an elephant as the icon for the database. Not that I'm suggesting you should do so...

As an aside, what's the reason behind being required to be "strictly UML compliant"? I'm just curious...
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
For SCEA part 2. (Kidding aside, Ill use tweety bird icon)
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I think we also need to know a bit more about which of the UML diagrams you want to show this database in.

The "drum" is recognizable, but is mostly taken to indicate the database system or database hardware, and is thus most appropriate for something like a deployment or structure diagram.

When representing a database in a sequence diagram I guess it is just a regular column; in a collaboration diagram probably a regular rectangle, and so on. I can't imagine many reasons to specifically include a database in any of the other diagrams.

Can you explain what you are trying to communicate about the database and its role in the system?


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2049
On the sequence diagram, I want to connect an arrow from a DAO (EJB bmp) to the database. I think the context of my question is highly on SCEA exam, so I probably should ask this in the SCEA forum instead.

I understand that UML is quite more of a guideline, and not a strict set of rules, except when Model-Driven-Development is involved.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Frank Carver:

When representing a database in a sequence diagram I guess it is just a regular column;


Mhh, I like the way the drum adds to the expressiveness of the diagram in the link I've given above.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: UML Sequence Diagram: database
 
Similar Threads
Tech Word Game
Large Files
Sharing data between web app's
Shopping Cart - Part 2
share data