Can I use class diagrams to model the logical database design? E.g., can I create a class diagram where each class represents a table in a database and then show the relationships between them along with their attributes and operations (such as stored procedures)?

jim conallen

I got this answer from Eric Naiburg, who is an expert in this area of UML application, and he said:

Yes you can use the class diagram to model the logical data model and it in fact is very well supported. The inheritance/generalization gives full support for super/sub typing, cardinality is supported as well as the ability to create an association entity that is related directly to the relationship rather than each entity as it should be. I don't believe that stored procedures are modeled in the logical model, but if you would like, you can use a class with operations stereotyped as a <<Stored Procedure>> to represent it as it does make sense. This is actually how Rational Rose represents a stored procedure as part of the UML Profile for Database Design. The relationships you should use would be association for non-mandatory/non-identifying relationships and composite aggregations for identifying/mandatory relationships. They map very well to the data model constructs.