Wednesday, April 5, 2017

What is impedance mismatch?

The misalignment of application layer objects to tables and rows is called impedance mismatch. Developers usually want a database which is easy to use. Relational databases save data in tables and rows, but our application hardly ever does.

class A{int x,string[] tags

--------------------------------------------------------------------------------------















In the above example we have an object that contains a field x and tags, which contains a bunch of strings, or tags .If we want to save this data in a database we would need three tables one for main object, another for tags, and another to map tags to main object. This forces the developer to write a mapping layer or use an ORM to translate between object in our memory and what is saved in the database.


No comments:

Post a Comment

Call a function in child component from parent component in React

Consider the following parent component class Parent extends React.Component { constructor(props) { super(props);         thi...