1
I did the data modeling (UML) but at the time of implementing I’m doubtful how to do.
I wish there was only one table Person.
In that table person I would have the field tipoPessoa("p","f")
and fields if the person is customer, barber, attendant, supplier, manufacturer, etc.
I wanted to make this implementation in Spring JPA that I saw that is very easy to use.
Here’s basically how I want the table on the bench:
Here’s how I want it to stay in java:
I know that this relationship between people and types could be manytomany generating an extra table, but for this project I want to do it anyway.
The doubt is how I do pro Spring understand that I want everything to be in the same table with Ex fields: pess.forn = "f", "t"
Regardless of the technology used it is not a good idea to model the database other than memory. I don’t like any of the models. This model is stuck in real life.
– Maniero