You may have scenarios, where you want to store a specific array configuration to the database. A classic example could be saving Yii widget configuration to the database and then retrieving it at runtime, with dynamic parameters set. This wiki discusses one of the approaches to do this. Let's consider you have something like the NavBar configuration below to store in the db:
To secure your database from inconsistencies resulting from failing (complex) operations, you (should) use transactions.
However, complex methods often rely on other complex methods that themselves build on transactions.
This HowTo presents a method to nest or embed transactions without relying on the database's nesting capabilities.