What is ORM? The idea of self-realization?

ORM: Map data to objects. Operate the object to operate the database. Class (model) is mapped to table, attribute is mapped to field

Realize your own ideas:

  1. Define the parent class, realize mysql connection, encapsulate CURD, transaction
  2. All Models inherit from the parent class and define the table name

Guess you like

Origin blog.csdn.net/weixin_38230961/article/details/106118648