开发者

Can I use my relational db table diagram to create UML class diagrams?

I am new to UML. But I'm well versed in drawing db tables and their relationships.

Can I just "extend" these tables by adding Methods() below and call it a UML Class Diagram?

Student

..........................

StudentID : in开发者_开发知识库t

StudentNumber : string

FirstName : string

Surname : string

..........................

Display()

Update()

Add()

Delete()


Making an object for every table isn't a good practice. Not every table needs to be an object in your UML... But then again... I think this is more for StackOverflow...


You seem to have the basics of UML. The main differences are that relationship types are different from SQL and that Java (or whatever language) data types don't match SQL data types directly, so you'll need to convert those as you have above.

[opinion] Unless you have a UML->code->UML tool I would not get too hung up on drawing the UML. It's mainly a tool for white boarding (IMHO) and trusting those diagrams tends to hurt you in the long run when maintenance changes make that sort of documentation obsolete. I prefer to use a code->UML tool when looking at legacy code rather than outdated UML diagrams from design time. [/opinion]

[edit] Since you already have working code you may want to try Amateras UML in Eclipse. You can drag a bunch of classes onto an empty document and it will create the UML diagram for you. [/edit]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜