I am starting a whole project by myself for the first time, and I am stuck between the UML modelization ( Class diagram ) and the database structure.
Should I use the exact same classes that I model in the class diagram in the database?
For example, I have two User
, the Service_provider
and the Client
. In the class diagram I consider each one of them as a unique class. But I chose to use single table inheritance in the database, so I store both users in the same table and add the role attribute to it.
Does my modelization stay valid in this case? or I just need one class for User
? (but in this case, I can't show the relationship between the Service_provider
and the Client
as the Service_provider
could have many Clients
)
Could anyone explain this to me, please?
The development of an app is supported by an entire set of (evolving) models, as illustrated in the diagram below.
The three main purposes of making UML class models when developing an app are:
For 1 and 2, you may take a look at my book An introduction to information modeling and databases, while for 3 you may check out a book on model-based development, e.g. for Java Backend Apps or JavaScript Frontend Apps.