Search CTRL + K

Impedance Mismatch

阻抗不匹配(impedance mismatch)指使用面向对象编程语言和 关系型数据库 时,需要一个繁琐的转换层处理对象与 之间的映射,这被称为阻抗不匹配

ORM 框架存在的原因

因为阻抗不匹配,需要写代码大量重复、繁琐的转换层,因此存在 ORM(object-relational mapping)框架去减少样板代码,但无法完全避免这两个 数据模型 之间的差异。[1]

- Designing Data-Intensive Applications


Designing Data-Intensive Applications

Most application development today is done in object-oriented programming languages, which leads to a common criticism of the SQL data model: if data is stored in relational tables, an awkward translation layer is required between the objects in the application code and the database model of tables, rows, and columns. The disconnect between the models is sometimes called an impedance mismatch.[1:1]


  1. Martin Kleppmann, Designing Data-Intensive Applications, n.d. p29 ↩︎ ↩︎