Install TDBM

Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality Build Status Coverage Status

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

Found a typo? Something is wrong in this documentation? Just fork and edit it!