In: Computer Science
In the above image, shows classes account,
tag(credit card tag as in image), transaction, credit card, vehicle
and violation relationships to one another in best possible
way.
Where an account may linked to multiple transactions and vehicles
But one transaction can be done for One vehicle at a time
And one vehicle may have multiple violations like: red light run AND hit and run AND expired License etc
An account can also have multiple credit cards
but One credit card can involve in multiple transactions
Further these classes can also expanded to more sub classes and relations between them can be refined. It all depends on the rules and scenarios particular organisation is following.