PHPackages                             graze/data-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. graze/data-db

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

graze/data-db
=============

Abstracted Database Nodes

06PHP

Since Sep 27Pushed 9y ago7 watchersCompare

[ Source](https://github.com/graze/data-db)[ Packagist](https://packagist.org/packages/graze/data-db)[ RSS](/packages/graze-data-db/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

data-db
=======

[](#data-db)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f5a4b6ea19162ccc7d249cd1a4ef7d85e63299e862210ad4a451dbcbe7e0d478/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772617a652f646174612d64622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graze/data-db)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/2618aee203d2758f38b4f60c82e215e1d41b137a2c7b934449b85d627064f527/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6772617a652f646174612d64622f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/graze/data-db)[![Coverage Status](https://camo.githubusercontent.com/f9325274eed9335facbd7bcaed017f5bce3227c39fda10c66be924a66cff4b31/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6772617a652f646174612d64622e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/graze/data-db/code-structure)[![Quality Score](https://camo.githubusercontent.com/e83dc0617b708208c11527175d7ab296701c87edba8f6f6aea36f041f2cd1ab1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6772617a652f646174612d64622e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/graze/data-db)[![Total Downloads](https://camo.githubusercontent.com/15c7b8de2d0d3fcc5b3af9aa4fc5bca133df288f50cac519407c299cb540b591/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772617a652f646174612d64622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/graze/data-db)

Library to import and export tables to/from files.

- Supports: `Pdo`, `Zend1`, and `Zend2` database adapters
- Supports: `Mysql` and `Redshift` databases currently.

### Install

[](#install)

Via Composer

```
$ composer require graze/data-db
```

### Usage

[](#usage)

```
$table1 = new Table($mysqlAdapter, 'schema', 'table');
$file = new LocalFile('/some/path/to/file');
$exporter = new TableExporter($file, new CsvFormat());
$exporter->export($table);

// file written to with the contents of $table1 in the default Csv Format

$table2 = new Table($redshiftAdapter, 'schema', 'table');
$importer = new RedshiftFileImporter($table2);
$importer->import($file);

// table2 now contains the contents of table1
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ make test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Harry Bragg](https://github.com/@h-bragg)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/637788?v=4)[graze.com](/maintainers/graze)[@graze](https://github.com/graze)

### Embed Badge

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

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M114](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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