How we add our own codepool ?

This is easy to create custom code pool in magento. Just follow the following step:

Open Mage.php that is located in directory app/Mage.php
Find include paths that was added as
$paths = array();

$paths[] = BP . DS . ‘app’ . DS . ‘code’ . DS . ‘local’;
$paths[] = BP . DS . ‘app’ . DS . ‘code’ . DS . ‘community’;
$paths[] = BP . DS . ‘app’ . DS . ‘code’ . DS . ‘core’;
$paths[] = BP . DS . ‘lib’;

Edit this section to:

$paths = array();

$paths[] = BP . DS . ‘app’ . DS . ‘code’ . DS . ‘custom’;
$paths[] = BP . DS . ‘app’ . DS . ‘code’ . DS . ‘local’;
$paths[] = BP . DS . ‘app’ . DS . ‘code’ . DS . ‘community’;
$paths[] = BP . DS . ‘app’ . DS . ‘code’ . DS . ‘core’;
$paths[] = BP . DS . ‘lib’;

How to implement EAV database model

If you’ve ever added a new product to Magento, you know that you’ve had to add some title, description and price to it (there are more attributes but we are using 3 for this example). When you saved your product, you used a total of 3 tables to save that information (a few more, but those are irrelevant for our example). First, a new Entity was added to DB, second, In Attribute table, you saved attributes (title, description and price) attached to that product, and finally to Value table, you saved 3 rows, attached to that product’s attributes.