Skip to content

Commit c8f92db

Browse files
author
bajins
committed
docs(DBS): 更新数据库相关文档内容
- 为多个嵌入式/本地数据库链接补充 Java 标签 - 新增 JetBrains Xodus 及 YouTrackDB 数据库条目 - 添加 ObjectDB 数据库链接 - 增加主流数据库定界符对照表,涵盖标识符、语句、字符串等各类定界符 - 补充 Apache Hive 和 Snowflake 数据库相关内容 同时更新了 IDE、Java 第三方库、ORM、系统工具等相关文档中的部分链接与描述。
1 parent 955194b commit c8f92db

File tree

12 files changed

+89
-16
lines changed

12 files changed

+89
-16
lines changed

DBS/关系型数据库.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,16 @@
3333
**嵌入式/本地数据库**
3434

3535
* [https://github.com/eclipse-store/store](https://github.com/eclipse-store/store) Java
36-
* [https://github.com/h2database/h2database](https://github.com/h2database/h2database)
37-
* [https://sourceforge.net/projects/hsqldb](https://sourceforge.net/projects/hsqldb)
36+
* [https://github.com/h2database/h2database](https://github.com/h2database/h2database) Java
37+
* [https://sourceforge.net/projects/hsqldb](https://sourceforge.net/projects/hsqldb) Java
3838
* [http://hsqldb.org](http://hsqldb.org)
39-
* [https://github.com/apache/derby](https://github.com/apache/derby)
39+
* [https://github.com/apache/derby](https://github.com/apache/derby) Java
4040
* [https://github.com/artbits/quickio](https://github.com/artbits/quickio) Java
4141
* [https://github.com/jankotek/MapDB](https://github.com/jankotek/MapDB) Java
42+
* [https://github.com/JetBrains/xodus](https://github.com/JetBrains/xodus) Java
43+
* [https://github.com/JetBrains/youtrackdb](https://github.com/JetBrains/youtrackdb) Java
4244
* [https://github.com/FirebirdSQL/firebird](https://github.com/FirebirdSQL/firebird)
45+
* [https://www.objectdb.com](https://www.objectdb.com) Java
4346

4447

4548

@@ -145,6 +148,22 @@ CURRENT_TIMESTAMP { + INTERVAL 1 [HOUR|MONTH|WEEK|DAY|MINUTE|...] }
145148

146149

147150

151+
**定界符对照表**
152+
153+
| 数据库 | 标识符定界符(Identifier Delimiters/Quote Identifiers) | 语句定界符(Statement Delimiters) | 字符串定界符 | 注释定界符 | 特殊/工具定界符 |
154+
|--------|-------------|------------|--------------|------------|----------------|
155+
| **MySQL/MariaDB** | 反引号 `` ` `` <br>(默认,ANSI模式下支持 `"`| 分号 `;` <br>可临时用 `DELIMITER` 更改 | 单引号 `'` <br>双引号 `"`(ANSI模式) | `-- `(空格)<br>`#` <br>`/* */` | `\G`(垂直显示)<br>`\g`(执行)<br>`DELIMITER $$` |
156+
| **SQL Server** | 方括号 `[]` <br>双引号 `"`(SET QUOTED_IDENTIFIER ON) | `GO`(工具)<br>分号 `;`(可选) | 单引号 `'` <br>`N'`(Unicode) | `--` <br>`/* */` | `;WITH`(CTE)<br>`GO n`(执行n次)<br>`!!`(OS命令) |
157+
| **Oracle** | 双引号 `"`(区分大小写)<br>无定界符(大写) | 分号 `;`(SQL)<br>斜杠 `/`(执行PL/SQL块)<br>`/`(脚本) | 单引号 `'` <br>`q'[...]'`(替代引号) | `--` <br>`/* */` <br>`REM`(SQL*Plus) | `:`(绑定变量)<br>`&`(替换变量)<br>`@`(运行脚本) |
158+
| **PostgreSQL** | 双引号 `"` | 分号 `;` | 单引号 `'` <br>`$$`(美元引号)<br>`E'`(转义字符串) | `--` <br>`/* */` | `\`(元命令)<br>`\g`(执行)<br>`\i`(包含文件) |
159+
| **SQLite** | 双引号 `"` <br>方括号 `[]` <br>反引号 `` ` ``(兼容) | 分号 `;` | 单引号 `'` <br>双引号 `"`(非标准) | `--` <br>`/* */` | `.`(点命令)<br>`.mode csv`<br>`.separator ,` |
160+
| **IBM DB2** | 双引号 `"` | 分号 `;` | 单引号 `'` | `--` <br>`/* */` | `@`(命令终止符)<br>`#`(临时表)<br>`:`(参数标记) |
161+
| **SAP HANA** | 双引号 `"` | 分号 `;` | 单引号 `'` | `--` <br>`/* */` | `:`(占位符)<br>`??`(搜索帮助) |
162+
| **Apache Hive** | 反引号 `` ` `` | 分号 `;` | 单引号 `'` | `--` <br>`/* */` | `\`(续行)<br>`!`(Shell命令) |
163+
| **Snowflake** | 双引号 `"` | 分号 `;` | 单引号 `'` <br>`$$` | `--` <br>`/* */` | `$`(变量)<br>`!`(Python)<br>`&`(绑定) |
164+
| **Amazon Redshift** | 双引号 `"` | 分号 `;` | 单引号 `'` <br>`$$` | `--` <br>`/* */` | `\`(续行)<br><code>&verbar;</code>(UNLOAD分隔符) |
165+
166+
148167
## 主流数据库对比
149168

150169

IDE/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
- 代码审查 [https://github.com/mimo-x/Code-Review-GPT-Gitlab](https://github.com/mimo-x/Code-Review-GPT-Gitlab)
116116
- [https://github.com/apps/gemini-code-assist](https://github.com/apps/gemini-code-assist)
117117
- [https://codeassist.google](https://codeassist.google)
118-
- [https://github.com/lintsinghua/XCodeReviewer](https://github.com/lintsinghua/XCodeReviewer)
118+
- [https://github.com/lintsinghua/DeepAudit](https://github.com/lintsinghua/DeepAudit)
119119

120120

121121

Java/Java构建管理.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,37 @@
223223

224224
## Maven
225225

226+
> Maven 的设计哲学是:环境必须先于构建就绪。依赖包属于“环境”的一部分。插件执行属于“构建”的一部分。
227+
228+
**Maven 的运行顺序**
229+
- 阶段 0 (项目模型构建与依赖解析The Hidden "Phase 0"):Maven 读取 `pom.xml`,看到 `<dependencies>` 里的 Jar 包,**立即**尝试去仓库下载。
230+
- 阶段 1 (执行生命周期Lifecycle Execution):下载并确认所有依赖都存在后,**才开始**执行 三套相互独立的生命周期:Clean Lifecycle (清理)、Default Lifecycle (构建核心)、Site Lifecycle (生成站点文档)。
231+
232+
**Default Lifecycle**的执行顺序是**严格线性**的:
233+
234+
| 顺序 | 阶段 (Phase) | 描述 | 常用插件/操作 |
235+
| :--- | :--- | :--- | :--- |
236+
| 1 | **validate** | 验证项目结构是否正确,必要信息是否完整。 | `maven-enforcer-plugin` |
237+
| 2 | **initialize** | 初始化构建状态,设置属性。 | |
238+
| 3 | **generate-sources** | 生成源码(如 Protobuf, Lombok 处理等)。 | |
239+
| 4 | **process-sources** | 处理源码(如过滤占位符)。 | `maven-resources-plugin` |
240+
| 5 | **compile** | **编译**项目的源代码。 | `maven-compiler-plugin` |
241+
| 6 | **process-classes** | 对编译生成的文件进行后处理。 | |
242+
| 7 | **generate-resources** | 生成资源文件。 | |
243+
| 8 | **process-resources** | 复制并处理资源文件到目标目录。 | `maven-resources-plugin` |
244+
| 9 | **test-compile** | 编译测试源代码。 | `maven-compiler-plugin` |
245+
| 10 | **test** | 运行单元测试。 | `maven-surefire-plugin` |
246+
| 11 | **package** | **打包**成可发布的格式(jar, war)。 | `maven-jar-plugin` |
247+
| 12 | **verify** | 运行检查以验证包的有效性。 | |
248+
| 13 | **install** | 将包**安装****本地 Maven 仓库**(供本地其他项目使用)。 | `maven-install-plugin` |
249+
| 14 | **deploy** | 将包**部署****远程仓库**(私服)。 | `maven-deploy-plugin` |
250+
251+
- 如果运行 `mvn compile`,Maven 会执行 1~5。
252+
- 如果运行 `mvn package`,Maven 会执行 1~11。
253+
- 如果运行 `mvn install`,Maven 会执行 1~13。
254+
255+
256+
226257
+ [https://maven.apache.org](https://maven.apache.org)
227258
+ [https://maven.apache.org/plugins/index.html](https://maven.apache.org/plugins/index.html)
228259
+ [https://github.com/ibofine/mavenbook](https://github.com/ibofine/mavenbook)

Java/Java第三方库.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@
4848
* [https://www.oracle.com/cn/java/technologies/javamail-releases.html](https://www.oracle.com/cn/java/technologies/javamail-releases.html)
4949
* [https://github.com/eclipse-ee4j/jaf](https://github.com/eclipse-ee4j/jaf)
5050
* [https://github.com/javaee/activation](https://github.com/javaee/activation)
51-
* SMB [https://github.com/AgNO3/jcifs-ng](https://github.com/AgNO3/jcifs-ng)
51+
* CIFS/SMB [https://www.jcifs.org](https://www.jcifs.org)
52+
* [https://github.com/AgNO3/jcifs-ng](https://github.com/AgNO3/jcifs-ng)
53+
* [https://github.com/pontiussoftware/smb-nio](https://github.com/pontiussoftware/smb-nio)
54+
* [https://github.com/hierynomus/smbj](https://github.com/hierynomus/smbj)
55+
* [https://github.com/codelibs/jcifs](https://github.com/codelibs/jcifs)
5256

5357

5458

@@ -139,7 +143,7 @@
139143
* [https://github.com/xiaolyuh/layering-cache](https://github.com/xiaolyuh/layering-cache)
140144
* GuavaCache使用示例 [https://github.com/songyaxu/guava-cache](https://github.com/songyaxu/guava-cache)
141145
* 存储和检索海量数据 [https://github.com/dCache/dcache](https://github.com/dCache/dcache)
142-
* 高效键值对存储 [https://github.com/OpenHFT/Chronicle-Map](https://github.com/OpenHFT/Chronicle-Map)
146+
* 键值对存储 [https://github.com/OpenHFT/Chronicle-Map](https://github.com/OpenHFT/Chronicle-Map)
143147
* Redis云管理平台 [https://github.com/sohutv/cachecloud](https://github.com/sohutv/cachecloud)
144148
* 压缩位图 [https://github.com/RoaringBitmap](https://github.com/RoaringBitmap)
145149

Java/ORM.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,25 +86,38 @@
8686
- [https://github.com/pgjdbc/pgjdbc](https://github.com/pgjdbc/pgjdbc)
8787
- [https://github.com/xerial/sqlite-jdbc](https://github.com/xerial/sqlite-jdbc)
8888
- [https://github.com/arthurblake/log4jdbc](https://github.com/arthurblake/log4jdbc)
89+
- Microsoft Access [https://sourceforge.net/projects/ucanaccess](https://sourceforge.net/projects/ucanaccess)
90+
- [https://sourceforge.net/projects/jackcess](https://sourceforge.net/projects/jackcess)
91+
- SQL Server [https://github.com/Microsoft/mssql-jdbc](https://github.com/Microsoft/mssql-jdbc)
8992

9093

91-
**注意使用的MySQL Connector/J驱动**
92-
93-
- `org.gjt.mm.mysql.Driver` 用于`3.x`版本之前,在`5.1.47`以上版本不存在该类,由一个名为MM (Monty's MySQL) 的项目开发的,该项目后来被Sun Microsystems收购
94-
- `com.mysql.jdbc.Driver` 用于`5.1.6`版本之前,在MySQL AB(后被Oracle Corporation收购)接手并继续开发JDBC驱动之后使用的
95-
- `com.mysql.cj.jdbc.Driver` 用于`5.1.6`版本之后
94+
**MySQL Connector/J驱动与MySQL版本差异**
9695

9796
> 从Java 6 `JDBC 4.0`开始,显式加载驱动类的步骤`Class.forName(…)`通常是不必要的,因为JDBC服务提供者机制会自动加载驱动
9897
98+
| 年代 | 驱动类名 | JAR 版本 | MySQL 服务器版本 | JDK 要求 | 状态 | 说明 |
99+
| ---------- | -------------------------- | --------- | ------------- | ---------- | -------- | -------- |
100+
| 1998-2003 | `org.gjt.mm.mysql.Driver` | 2.x | 3.x ~ 4.0 | JDK 1.2+ | **废弃** | 由MM代表作者 Mark Matthews开发,该项目后来被Sun Microsystems收购,在`5.1.47`以上版本不存在该类 |
101+
| 2003-2005 | `com.mysql.jdbc.Driver` | 3.x | 4.0 ~ 4.1 | JDK 1.4+ | **废弃** | 在MySQL AB(后被Oracle Corporation收购)接手MM并继续开发JDBC驱动之后使用的 |
102+
| 2005-2016 | `com.mysql.jdbc.Driver` | 5.0.x | 5.0 ~ 5.1 | JDK 1.4+ | **废弃** | |
103+
| 2005-2016 | `com.mysql.jdbc.Driver` | **5.1.x** | **5.0 ~ 5.7** | JDK 1.5+ | **EOL** | 用于`5.1.6`版本之前使用,在 Connector/J 8.0 中虽然存在,但2018 年 4 月已标记为 Deprecated(弃用)。`5.1.44+` 可连接 MySQL 8.0(需加 useSSL=false 等参数),但不支持新特性(如 8.0 的默认新加密认证方式caching_sha2_password) |
104+
| 2016-2018 | `com.mysql.cj.jdbc.Driver` | 6.x/7.x | 5.5 ~ 8.0 | JDK 8+ | **不推荐** | |
105+
| **2018至今** | `com.mysql.cj.jdbc.Driver` | **8.0.x** | **5.6 ~ 8.x** | **JDK 8+** | **推荐使用** | |
106+
107+
108+
109+
* 驱动版本 [https://dev.mysql.com/downloads/connector/j](https://dev.mysql.com/downloads/connector/j)
110+
* [https://downloads.mysql.com/archives/c-j](https://downloads.mysql.com/archives/c-j)
111+
* [https://mvnrepository.com/artifact/com.mysql/mysql-connector-j](https://mvnrepository.com/artifact/com.mysql/mysql-connector-j)
112+
* [https://mvnrepository.com/artifact/mysql/mysql-connector-java](https://mvnrepository.com/artifact/mysql/mysql-connector-java)
99113

100114

101115
**URL及参数**
102116

103-
* [(https://mysql-net.github.io/MySqlConnector/connection-options]((https://mysql-net.github.io/MySqlConnector/connection-options)
117+
* [https://mysql-net.github.io/MySqlConnector/connection-options](https://mysql-net.github.io/MySqlConnector/connection-options)
104118
* [https://mysqlconnector.net/connection-options](https://mysqlconnector.net/connection-options)
105119

106-
> `jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false`
107-
> `&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai`
120+
> `jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai`
108121
109122
| 参数名称 | 参数说明 | 缺省值 | 最低版本要求 |
110123
|----------------------- |--------------------------------------------------------------------------------- |-------- |-------------- |

Other/Markdown.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ string &operator+(const string& A,const string& B) //cpp
459459
* [https://github.com/geekjourneyx/md2wechat-mcp-server](https://github.com/geekjourneyx/md2wechat-mcp-server)
460460
* [https://www.md2wechat.cn](https://www.md2wechat.cn)
461461
* [https://github.com/caol64/wenyan](https://github.com/caol64/wenyan)
462+
* [https://github.com/tenngoxars/WeMD](https://github.com/tenngoxars/WeMD)
462463

463464

464465
- [mp-transform-public](https://github.com/ZhuPeng/mp-transform-public)

Other/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686
* [https://github.com/binwiederhier/ntfy](https://github.com/binwiederhier/ntfy)
8787
* [https://github.com/beilunyang/moepush](https://github.com/beilunyang/moepush)
8888
* [https://github.com/songquanpeng/message-pusher](https://github.com/songquanpeng/message-pusher)
89+
* 微信消息 [https://github.com/frankiejun/wxpush](https://github.com/frankiejun/wxpush)
90+
* [https://github.com/hezhizheng/go-wxpush](https://github.com/hezhizheng/go-wxpush)
8991

9092

9193
- [https://github.com/guanguans/notify](https://github.com/guanguans/notify)

PL/交互协议.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
- [https://github.com/xsf/xmpp.org](https://github.com/xsf/xmpp.org)
153153
- [https://xmpp.org](https://xmpp.org)
154154
- [https://jabber.org](https://jabber.org)
155+
- [https://github.com/igniterealtime/Openfire](https://github.com/igniterealtime/Openfire)
155156
- [https://github.com/mathiasertl/django-xmpp-server-list](https://github.com/mathiasertl/django-xmpp-server-list)
156157
- [https://sourceforge.net/projects/pidgin](https://sourceforge.net/projects/pidgin)
157158
- [https://imfreedom.org](https://imfreedom.org)

PL/硬件交互.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
* [https://github.com/luoyan35714/OPC_Client](https://github.com/luoyan35714/OPC_Client)
5858
* [https://github.com/kohsuke/jinterop-proxy](https://github.com/kohsuke/jinterop-proxy)
5959
* [https://github.com/GreatGarlic/OpcClient](https://github.com/GreatGarlic/OpcClient)
60-
* [https://github.com/codelibs/jcifs](https://github.com/codelibs/jcifs)
6160
* [https://github.com/neugates/neuopc](https://github.com/neugates/neuopc)
6261
* [https://www.unified-automation.com](https://www.unified-automation.com)
6362

Python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ with Test() as t: # 触发__exit__
111111
* [https://github.com/pybind](https://github.com/pybind)
112112
* [https://github.com/wlav/cppyy](https://github.com/wlav/cppyy)
113113
* [https://github.com/ethan-funny](https://github.com/ethan-funny)
114-
114+
* [https://github.com/astral-sh/ty](https://github.com/astral-sh/ty)
115115

116116

117117

0 commit comments

Comments
 (0)