Skip to content
gabordemooij edited this page Sep 13, 2010 · 1 revision

To sum up, if you use Redbean:
- you don’t have to model a database a priori.
- you don’t have to import this model into your code.
- you don’t have to write XML, YAML, JSON or any other configuration file to specify the mappings.
- you don’t have to install an ORM layer or database wrapper other than RedBean and that is just one file.
- you don’t have to write extensive models with accessors, you don’t even have to write models at all, the choice is yours.
- you don’t have to maintain your database and write conversion scripts if an update happens.
- you don’t have to clean up your database (Redbean has a garbage collector for unused tables and columns).
- you don’t have to monitor performance and maintain indexes, Redbean optimizes indexes.
- you don’t have to do type conversions, RedBean adjust column types to fit your code.
- you don’t have to define associations, RedBean creates the appropriate tables on the fly and maintains all associations, also if you delete an entity that is part of an association structure.
- you don’t have to install or configure scripts or systems to keep multiple workstations in sync or distribute database snapshots among developers.

Furthermore RedBean:
- Offers great debugging facilities.
- Runs on both MyISAM and InnoDB
- Handles transactions in the background, you never need to worry about this yet RedBean keeps your database in shape! :-)
- Offers a locking mechanism for all table rows that eliminates race-condition problems.
- Keeps track of its own tables and does not touch ‘unknown’ tables, thereby RedBean can coexist peacefully with other database manipulating code.
- Installs at first run, no need to import SQL, just invoke a single RedBean method and the system will install all tables required and prepares your system to run.
- Offers production mode called ‘freeze’, to stop the database from changing if your code being shipped to production servers.
- Produces rather portable databases (except for tinyint, but this requires only a minor conversion).
- RedBean is just an all-in-one file, no need for path-configuration, extra directories or cumbersome configuration files. All configuration is done via some global space variables that are encapsulated at the end of the script (no worries, they are just global to make configuration easy, the globals are ignored in the rest of the script).

Clone this wiki locally