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. [Database &amp; ORM](/categories/database)
4. /
5. bingher/db

ActiveLibrary[Database &amp; ORM](/categories/database)

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

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

v1.4.12(4mo ago)103341[1 issues](https://github.com/hbh112233abc/db/issues)MITPHPPHP &gt;=7.1|&gt;= 7.2.5|&gt;=8.0.0

Since Apr 3Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/hbh112233abc/db)[ Packagist](https://packagist.org/packages/bingher/db)[ RSS](/packages/bingher-db/feed)WikiDiscussions main Synced 3w 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

43

—

FairBetter than 90% of packages

Maintenance73

Regular maintenance activity

Popularity20

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

139d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7788164?v=4)[huangbinghe](/maintainers/hbh112233abc)[@hbh112233abc](https://github.com/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

[zoujingli/think-library

Library for ThinkAdmin

8372.1k20](/packages/zoujingli-think-library)[topthink/think-migration

96482.4k126](/packages/topthink-think-migration)[topthink/think-mongo

mongodb driver for thinkphp6.0

106142.8k6](/packages/topthink-think-mongo)[nhzex/think-phinx

Phinx integration for thinkphp

243.2k](/packages/nhzex-think-phinx)

PHPackages © 2026

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