phpdatabaseormredbeannotorm

RedBeanPHP, NotORM and DibiPHP. Which one of these simple ORM is the best?


I am looking for a simple ORM for PHP for a small project. I found 3 of them. Do you have any idea of which one is the best?

http://redbeanphp.com

http://www.notorm.com

http://dibiphp.com

I appreciate any help. Thanks.


Solution

  • I personally picked RedBean. I never tried Notorm nor Dibiphp though, but they seem to be WAY less integrated. As an example, DibiPHP has you parse SQL queries directly.

    dibi::query('UPDATEtableSET ', $arr, 'WHEREid`=%i', $x);

    On the other side, RedBean would not require any SQL query to run. Just create your object, set values, and send a CRUD instruction to Redbean (create, read, update, delete) :

    $user = R::dispense( 'users' );
    $user -> first_name = 'John';
    $id = R::store( $user );