首页  

java 数据库访问 持久层 框架     所属分类 java 浏览量 241
MyBatis Hibernate JPA JOOQ JDBCTemplate Ebean

MyBatis SQL语句构建器

MyBatis-Plus   单表 crud
https://baomidou.com/

jdbi
http://jdbi.org/

类似 mybatis-plus  jpa 的简单实现 ,核心就一个类 
https://gitee.com/dyyx/simpleORM

轻量级ORM框架SmartJdbc
https://gitee.com/icecooly/SmartJdbc
https://gitee.com/dyyx/SmartJdbc


JPA Java持久层Api规范


Hibernate 
ORM 与 OO 
彻底封装SQL 用面向对象 创造一个新的查询语言代替sql,比如hql
hibernate  过度设计 概念复杂 性能不佳 优化困难


hql语句 select count(*) from User
User是一个Java类,不是数据库表 User

JPQL Java Persistence Query Language

表之间的连接查询,映射为实体类之间的关联关系

QueryDSL JOOQ

JOOQ DSL很大一部分是通用的
分页查询 JOOQ会把 limit/offset 换成等价的目标数据库的SQL语句


JDBC 参数化的sql  预编译语句
JPA Criteria API

Jooq Java Object Oriented Querying
get back in control of your sql
jOOQ generates Java code from your database and lets you build type safe SQL queries through its fluent API

DSL  
DSLContext

DSL Domain Specific language

Sql2o is a small Java library, that makes it easy to execute sql statements against your JDBC compliant database.

https://www.sql2o.org/
https://github.com/aaberg/sql2o
https://gitee.com/dyyx/hellocode/tree/master/favor/sql2o

sql2o is a small library, which makes it easy to convert the result of your sql-statements into objects. 
No resultset hacking required. Kind of like an orm, but without the sql-generation capabilities. 
Supports named parameters.




ActiveJDBC
https://javalite.io/activejdbc


ORM 两种 实现方案, DataMapper和ActiveRecord
PHP对应的开源实现为 Doctrine 和 Eloquent



Jooq 简介及实例 MybatisPlus简介

上一篇     下一篇
scala map 操作

HikariCP 使用及参数

jackson TypeReference使用 json string 转 泛型 list

时序数据库技术点

scala Option(null) 和 Some(null) 的区别

scala Option 小结