ORM (Object-Relational Mapping)

Contents

When dealing with database-driven web applications (and sites) often times interacting with the DB is one of the most repetitive and messy tasks. Having to manually build SELECT, INSERT, UPDATE, and DELETE queries for a multitude of tables is time consuming and mostly deterministic.

Object-Relational
Mapping (ORM) helps to reduce the tedium, creates cleaner code, make relationships easy to access. Rows from a relational database management system (RDBMS) such as MySQL, PostgreSQL, SQL Server, Oracle, DB2, etc. are translated into objects in the programming language.

ORM Classes in Flourish

The ORM features of Flourish are primarily accomplished by the following two classes:

fActiveRecord - Handles creation and manipulation of single database records

Why Another ORM?

You may be wondering, why build another PHP "framework" with ORM functionality? Flourish is intended to be more of a library of PHP code as opposed to a framework (defined as strict set of conventions, rules and methods that must be followed to build a site). In addition Flourish sits somewhere between the frameworks and ORM suites by providing some of the more advanced ORM features that most of the frameworks are missing, while being lighter weight and easier to use than the ORM suites.