Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

47 changes: 2 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,10 @@
[![Total Downloads](https://poser.pugx.org/mouf/database.tdbm/downloads)](https://packagist.org/packages/mouf/database.tdbm)
[![Latest Unstable Version](https://poser.pugx.org/mouf/database.tdbm/v/unstable)](https://packagist.org/packages/mouf/database.tdbm)
[![License](https://poser.pugx.org/mouf/database.tdbm/license)](https://packagist.org/packages/mouf/database.tdbm)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/thecodingmachine/database.tdbm/badges/quality-score.png?b=4.3)](https://scrutinizer-ci.com/g/thecodingmachine/database.tdbm/?branch=4.3)
[![Build Status](https://travis-ci.org/thecodingmachine/database.tdbm.svg?branch=4.3)](https://travis-ci.org/thecodingmachine/database.tdbm)
[![Coverage Status](https://coveralls.io/repos/thecodingmachine/database.tdbm/badge.svg?branch=4.3&service=github)](https://coveralls.io/github/thecodingmachine/database.tdbm?branch=4.3)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/thecodingmachine/database.tdbm/badges/quality-score.png?b=5.x)](https://scrutinizer-ci.com/g/thecodingmachine/database.tdbm/?branch=5.x)


About TDBM (The DataBase Machine)
=================================

What is it?
-----------

THE DATABASE MACHINE (TDBM) is a PHP library designed to ease your access to your database.

The goal behind TDBM is to make database access as easy as possible. Users should access their objects easily, and store those objects as easily.


Design philosophy
-----------------

Design choices:

- _TDBM starts with your database model and generates PHP files._ TDBM **understands your database model**. From it,
it will generate PHP classes that will help you access your database. It will generate 2 kind of classes: *DAOs*
that are services helping you access a given table, and *Beans* that are classes representing a row in your database.
Because PHP objects are generated, it means you get a nice **autocompletion** in your favorite IDE.
- _TDBM is really good at understanding the meaning and the intent behind your database model._
TDBM has one of **the most powerful database model analyzer** that helps it
map tables to objects.
TDBM relies on your foreign key constraints to find joins between tables.
TDBM finds these constraints itself in the database by querying the
DB system. It can automatically detect pivot table to generate **many to many relationships**. It can also
detect **inheritance** relationships.
- _Simplicity first._ TDBM is meant to be easy to use and non obtrusive.
- _Making simple tasks should be simple._ TDBM does not cover everything you can do with a complete ORM system.
But it makes as simple as possible those tasks you do 80% of the time. For the remaining 20% (like performance critical requests, and so on), you can use SQL.
For instance, TDBM has a **unique feature that guesses jointures for you**. No need to write joins anymore!
- _No configuration._ There is no configuration needed for TDBM. You provide TDBM the name of your database, the user and password and you start using it.
- _Based on Doctrine DBAL._ TDBM uses the Doctrine database abstraction layer for low level database access. It allows
compatibility with a very wide range of databases.

Ready to dive in? Let's get started!

- [Install TDBM](doc/install.md)
- [Access the database, perform queries, inserts and updates](doc/quickstart.md)
- [Add limit and offsets to your queries](doc/limit_offset_resultset.md)
- [Regenerating DAOs and beans](doc/generating_daos.md)
- [Modeling inheritance](doc/modeling_inheritance.md)
- [Improving memory usage](doc/memory_management.md)
- [A quick comparison with Doctrine](doc/comparison_with_doctrine.md)
- [TDBM internals](doc/internals.md)
Check the documentation at https://github.com/thecodingmachine/tdbm
27 changes: 4 additions & 23 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,15 @@
],
"require" : {
"php" : ">=7.1",
"mouf/magic-query" : "^1.2.1",
"mouf/schema-analyzer": "^1.1",
"doctrine/dbal": "~2.5",
"doctrine/cache": "~1.5",
"thecodingmachine/tdbm" : "^5.0",
"mouf/database.doctrine-dbal-wrapper": "~1.1",
"mouf/utils.common.conditioninterface" : "~2.0",
"psr/log": "~1.0",
"mouf/mouf": "~2.0.10",
"doctrine/inflector": "~1.0",
"beberlei/porpaginas": "~1.0",
"mouf/classname-mapper": "~1.0",
"mouf/utils.common.doctrine-cache-wrapper": "~1.0",
"greenlion/php-sql-parser": "^4.1",
"phlib/logger": "^2.1",
"symfony/console": "^2.0 || ^3.0",
"mouf/utils.console": "^1.0",
"mouf/utils.log.psr.multi-logger": "^1.0",
"symfony/filesystem": "~2.7|~3.0"
"mouf/utils.console": "^1.0"
},
"require-dev" : {
"phpunit/phpunit": "^5.5",
"satooshi/php-coveralls": "^1.0",
"wa72/simplelogger" : "^1.0",
"friendsofphp/php-cs-fixer": "^2.1",
"symfony/process": "^3.0"
},
"suggest" : {
"ext/weakref" : "Allows efficient memory management. Useful for batches."
"friendsofphp/php-cs-fixer": "^2.1"
},
"autoload" : {
"psr-4" : {
Expand All @@ -67,7 +48,7 @@
"install" : [
{
"type" : "url",
"url" : "tdbminstall2/",
"url" : "tdbminstall3/",
"description" : "The install process of TDBM proposes to set up the DAOs and beans for your default DB connection."
}
],
Expand Down
45 changes: 0 additions & 45 deletions phpunit.xml.dist

This file was deleted.

Loading