Where and how does drupal store the node body in drupal 7? I am programatically trying to create a custom node to store some content, which I would like to display on a page.
Following is how I am executing it.

    $node = new StdClass();
    $node-&gt;name = $value;
    $node-&gt;title = $node-&gt;name;
    $node-&gt;language = LANGUAGE_NONE;
    $node-&gt;body[$node-&gt;language][0]['value']   = $javascript.$html;
    $node-&gt;body[$node-&gt;language][0]['summary'] = $type;
    $node-&gt;type = "custom_type";
    $node-&gt;created = time();
    node_save($node);


I notice that the content I inserted are present in the tables
'field_data_body' and 'field_revision_body'
I try to load the node and get the content

   $query = new EntityFieldQuery();
   $entities = $query-&gt;entityCondition('entity_type', 'node')
              -&gt;propertyCondition('type', 'custom_type')
              -&gt;propertyCondition('title', $type)                         
              -&gt;execute();
   if (!empty($entities['node'])) {
        $node = node_load(array_shift(array_keys($entities['node'])));
        $html = $html.$node-&gt;body[$node-&gt;language][0]['value'];
   }


But what puzzles me is how from where is the content being loaded. I deleted the entries in both 'field_data_body' and 'field_revision_body', but the content still gets loaded.

So how does drupal7 save and load the contents of the node body?
If you emptied out the field_data_body (and revision) table and you are still getting data that can only mean three things: 


you emptied the wrong table (wrong database or the right database with the wrong prefix) 
it's still cached (there's a clear cache button on the admin/config/development/performance page).
You are not using SQL to store your fields. Do you have mongodb_field_storage enabled? Something even more exotic?


As for how it gets stored, node_save calls field_attach_insert (and node_load calls field_attach_load) which, in turn, calls the field storage module which I presume is field_sql_storage and so field_sql_storage_field_storage_write writes your database records and field_sql_storage_field_storage_load loads them.

Also note that array_shift(array_keys()) is wrong (E_STRICT error: Only variables should be passed by reference because array_shift takes a reference and array_keys is not returning by reference. Finally, you should feed your EntityFieldQuery code to the coder module to fix the coding standards: at least the code inside the if is indented wrong and the string concat operator (the dot) needs spaces on both sides. It hurts my eyes :)