The idea of ββan object-relational mismatch arises from problems that arise when trying to use the object-oriented programming approach supported by a relational database. The problem arises because object models usually contain hierarchies of objects that need to be shredded and rebuilt from several tables, rather than storing the whole object.
However, the argument that usually arises at this point is that if you did not find a problem, then this is your mistake because you are not following the βcorrectβ object-oriented orientation and that you will find a mismatch when you learn to do object orientation "right". And we all know that object orientation is the only "right" development paradigm.
Oh wait.
Many systems are not suitable for modeling as object-oriented systems. In fact, for things like web applications that have low overall complexity (with a localized high degree of complexity) and require high concurrency and scalability, using service-oriented and messaging methods may be the best option. When the application is written in this way, you find that there is not too much relational object mismatch, because you are not using things like lazy loading and complex object hierarchies, and your objects are immutable, so they do not need to be chopped back to the database.
So, is there an object-relational mismatch? Yes, if you try to use object-oriented methods with a relational database. But you can soften it by not using object-oriented methods if other approaches are better suited to your application.
source share