本文首发于cartoon的博客
转载请注明出处:https://cartoonyu.github.io/c...
Mybatis 有哪些执行器(Executor)?
SimpleExecutor
- 只允许执行update或select语句
- 每执行一次Statement对象都销毁该对象
ReuseExecutor
- 执行update或select语句
- Statement对象复用,存储在Map内
BatchExecutor
- 执行update语句
- 批处理update语句
选择默认Executor
- 在config文件中通过defaultExecutorType参数指定
- 创建SqlSession传递ExecutorType参数
Mybatis 分页插件的实现原理是什么?
- 暂未了解
Mybatis 如何编写一个自定义插件?
- 暂未了解
数据库的三范式是什么?
一范式
- 列的原子性
- 应用:主键
二范式
- 所有非主键完全依赖主键,不能产生部分依赖
- 应用:外键
三范式
- 非主键字段与主键字段不能产生传递依赖