William Jiang

JavaScript,PHP,Node,Perl,LAMP Web Developer – http://williamjxj.com; https://github.com/williamjxj?tab=repositories

RedBeanPHP

RedBeanPHP

RedBeanPHP (http://www.redbeanphp.com/) is a tool to store objects and relations in the database without any form of preparation (except creating an empty database) while still generating a readable and easily queryable schema.
That means it automatically creates tables, columns, keys and indexes.

According to its introduction,
RedBeanPHP is an easy to use ORM (Object relational mapping) library for PHP. RedBeanPHP automatically creates tables, indexes, columns and foreign keys for you. You can just start programming and RedBeanPHP will create all database structures for you on-the-fly as you go. The resulting database will be perfectly readable and queryable.

RedBean is easy ORM tool that stores beans directly in the database and creates all tables and columns required on the fly. On the other hand it allows plain SQL to search the database. In fact RedBean is some sort of combination between document oriented database tools like mongoDB or couchDB and traditional relational database systems like MySQL. It offers the best of both worlds: SQL and no-SQL. You work with no-SQL if you interact with objects will you simply turn the switch and work with SQL if you want to do some typical database tasks like searching or quickly grabbing something out of the data store with specially crafted SQL. RedBean also has excellent performance because it can freeze the database schema which means it no longer scans schema.

My understanding:

  • For auto creating tables etc, it is not a big attraction: For professional development, database/tables design, adjustment and improvement are very important, also involving columns field optimizing, views, functions, store procedures, triggers, etc, which auto-work can not just replace, so manually processing is very basic and necessary.
  • I am doubting the performance and mess-up when the tables become complex. guess many-2-many cases.
  • So the concept might be suitable for PHP Frameworks, which doesn’t use directly SQL at all, just like $table->save(), $obj->findAll(), $app->update($id), etc. Combining both of them, all the database part can be hidden, without direct interact. How many programmers agree with this?

However, the feature of combination between no-SQL and SQL are highlights, the tool has the ability to auto switch between MongoDB and MySQL, this is some kind of cool.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: