How can I populate some records after my plugin is installed? When I install the plugin, I need to automatically create a few records. How can I have my plugin automatically create those records when it is installed?
On the main MyPluginPlugin class, there is a method you can override called onAfterInstall(). Which will run after your plugin is installed.

To create those records, you can place the following code into the method:

public function onAfterInstall()
{
    $record = new MyPlugin_ExampleRecord;
    $record-&gt;setAttribute('attributeName', 'value');
    $record-&gt;save();

    $record2 = new MyPlugin_ExampleRecord;
    $record2-&gt;setAttribute('attributeName', 'value2');
    $record2-&gt;save();
}