PHPackages                             bingher/db - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bingher/db

ActiveLibrary

bingher/db
==========

ThinkPHP orm driver for DM(达梦),KingDatabase(金仓)

v1.4.12(3mo ago)11319↓100%1[1 issues](https://github.com/hbh112233abc/db/issues)MITPHPPHP &gt;=7.1|&gt;= 7.2.5|&gt;=8.0.0

Since Apr 3Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/hbh112233abc/db)[ Packagist](https://packagist.org/packages/bingher/db)[ RSS](/packages/bingher-db/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (32)Used By (0)

think-orm driver for DM(达梦),GBase8s(南大通用),OpenGauss(高斯),KingBase(金仓)
====================================================================

[](#think-orm-driver-for-dm达梦gbase8s南大通用opengauss高斯kingbase金仓)

安装
--

[](#安装)

```
composer require bingher/db
```

DM8(达梦)
-------

[](#dm8达梦)

`config.database.php`配置参考如下:

```
return [
    // 默认使用的数据库连接配置
    'default'         => env('DB_DRIVER', 'dm'),

    ...

    // 数据库连接配置信息
    'connections'     => [
        'dm'          => [
            // ★Builder类
            'builder'         => \bingher\db\builder\DM::class,
            // ★Query类
            'query'         => \bingher\db\query\DM::class,
            // ★数据库类型
            'type'            => \bingher\db\connector\DM::class,
            ...
        ],
    ]
];
```

GBase8s(南大通用)
-------------

[](#gbase8s南大通用)

`config.database.php`配置参考如下:

```
return [
    // 默认使用的数据库连接配置
    'default'         => env('DB_DRIVER', 'gbase'),

    ...

    // 数据库连接配置信息
    'connections'     => [
        'gbase'          => [
            // ★Builder类
            'builder'         => bingher\db\builder\GBase::class,
            // ★Query类
            'query'         => bingher\db\query\GBase::class,
            // ★数据库类型
            'type'            => bingher\db\connector\GBase::class,
            // ★驱动类型: pdo_gbasedbt,pdo_odbc
            'driver'          => env('C_DRIVER', 'pdo_odbc'),
            ...
        ],
    ]
];
```

OpenGauss(高斯)
-------------

[](#opengauss高斯)

`config.database.php`配置参考如下:

```
return [
    // 默认使用的数据库连接配置
    'default'         => env('DB_DRIVER', 'gauss'),

    ...

    // 数据库连接配置信息
    'connections'     => [
        'gauss'          => [
            // ★Builder类
            'builder'         => bingher\db\builder\OpenGauss::class,
            // ★Query类
            'query'         => bingher\db\query\OpenGauss::class,
            // ★数据库类型
            'type'            => bingher\db\connector\OpenGauss::class,
            ...
        ],
    ]
];
```

KingBase(金仓) **未测试验证**
----------------------

[](#kingbase金仓-未测试验证)

`config.database.php`配置参考如下:

```
return [
    // 默认使用的数据库连接配置
    'default'         => env('DB_DRIVER', 'kdb'),

    ...

    // 数据库连接配置信息
    'connections'     => [
        'kdb'          => [
            // ★Builder类
            'builder'         => bingher\db\builder\KingBase::class,
            // ★Query类
            'query'         => bingher\db\query\KingBase::class,
            // ★数据库类型
            'type'            => bingher\db\connector\KingBase::class,
            ...
        ],
    ]
];
```

参考资料
----

[](#参考资料)

### 达梦数据库

[](#达梦数据库)

- [达梦数据库-快速上手](https://eco.dameng.com/document/dm/zh-cn/start)
- [达梦数据库-应用开发指南-PHP 数据库接口](https://eco.dameng.com/document/dm/zh-cn/app-dev/php-php.html)
- [thinkphp6 phpstudy php8 达梦数据库](https://blog.csdn.net/qq_22471701/article/details/127785640)

### 南大通用数据库

[](#南大通用数据库)

- [南大通用 GBASE 8s V8.8 最全安装指南（一网打尽）](https://www.gbase.cn/community/post/4718)
- [GBase 8s数据库连接 - PHP PDO\_GBASEDBT](https://www.gbase.cn/community/post/156)
- [GBase 8s数据库连接 - PHP ODBC](https://www.gbase.cn/community/post/155)
- [Nginx下PHP连接到GBase 8s数据库 - PDO\_GBASEDBT方式](https://blog.csdn.net/liaosnet/article/details/138073622)

### OpenGauss

[](#opengauss)

- [官网](https://opengauss.org/zh/)
- [MySQL迁移openGauss](https://docs.opengauss.org/zh/docs/5.0.0/docs/DataMigrationGuide/%E5%85%A8%E9%87%8F%E8%BF%81%E7%A7%BB.html)
- [【数据库迁移系列】使用pg\_chameleon将数据从MySQL迁移至openGauss数据库](https://blog.csdn.net/GaussDB/article/details/127011147)
- 创建DBA用户

```
create user 用户名 with sysadmin login password '密码';
```

- 创建兼容mysql的数据库

`DBCOMPATIBILITY` 取值范围：A、B、C、PG。分别表示兼容 O、MY、TD和POSTGRES

```
create database 数据库名 owner gbase8s DBCOMPATIBILITY= 'B' ENCODING 'UTF8' LC_COLLATE'en_US.UTF-8' LC_CTYPE'en_US.UTF-8'
```

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance81

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~64 days

Total

31

Last Release

94d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c1da3d6c4d29c7a57ccd6d492fadb30cdb3467a8f1517ca07babf87f73de54f?d=identicon)[hbh112233abc](/maintainers/hbh112233abc)

---

Top Contributors

[![hbh112233abc](https://avatars.githubusercontent.com/u/7788164?v=4)](https://github.com/hbh112233abc "hbh112233abc (41 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bingher-db/health.svg)

```
[![Health](https://phpackages.com/badges/bingher-db/health.svg)](https://phpackages.com/packages/bingher-db)
```

###  Alternatives

[topthink/think

the new thinkphp framework

8.0k1.2M13](/packages/topthink-think)[zoujingli/think-library

Library for ThinkAdmin

8569.8k17](/packages/zoujingli-think-library)[zhongshaofa/easyadmin

基于ThinkPHP6.0和layui的快速开发的后台管理系统。

6609.3k](/packages/zhongshaofa-easyadmin)[jaguarjack/catchadmin

The CatchAdmin Background management

8962.6k](/packages/jaguarjack-catchadmin)[saithink/saiadmin

webman plugin

2709.9k1](/packages/saithink-saiadmin)[topthink/think-annotation

Annotation For ThinkPHP

4831.5k8](/packages/topthink-think-annotation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
