File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Class diagram for database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Class diagram for database" Watch "Class diagram for database" New topic
Author

Class diagram for database

Ashish Sarin
author
Ranch Hand

Joined: Nov 20, 2000
Posts: 403
    
    5
Hi everyone,

I have created a database class diagram to show important attributes, primary keys, relationships and multiplicity. I know this is possibly an overkill but this helps me in hightlighting of some of the design decisions. I haven't seen many database class diagrams, but would like to know that does it makes sense to show the primary key of a table by using the notation: Customer_ID(PK) ? or its better to write it in the notes ?

thanks
Ashish


Author of
Getting started with Spring Framework
Portlets in Action
Spring Roo 1.1 Cookbook
Portlets blogSpring Roo blog
J Gupta
Ranch Hand

Joined: Jul 16, 2008
Posts: 30
Ashish
What is a class database digram. Did you meam ER diagram ? ER digram and
Class diagram are two different things.
Ashish Sarin
author
Ranch Hand

Joined: Nov 20, 2000
Posts: 403
    
    5
I mean the data model class diagram.
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Class diagram is for class, not database table.

About showing PK by (PK), I think it's OK, if you explain in documentation.


SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Ashish Sarin
author
Ranch Hand

Joined: Nov 20, 2000
Posts: 403
    
    5
How is data model class diagram different from a normal class diagram depicting various classes in the system? I thought that that data model class diagram is made from database perspective, where you specify the tables and their columns and their associations. Can you please mention some links to have a look at a few sample data models ?

thanks
Ashish
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6657
    
    5

Originally posted by Ashish Sarin:
How is data model class diagram different from a normal class diagram depicting various classes in the system? I thought that that data model class diagram is made from database perspective, where you specify the tables and their columns and their associations. Can you please mention some links to have a look at a few sample data models ?

thanks
Ashish


It is usually called an ER diagram or a data model. There is no such thing as a data model class diagram.

Anything that you feel will help explain your system better is a good thing. You sure can include the diagram in the solution documentation. Good luck with your exam


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Ashish Sarin
author
Ranch Hand

Joined: Nov 20, 2000
Posts: 403
    
    5
Thanks John
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class diagram for database
 
Similar Threads
about web tier design(SCEA Part II)
Too many classes in the diagram!!! Am I wrong?
Class diagrams
Do we need to show Attributes in class diagram
Urgent: need advice on part 2