In which tables and columns data is stored for Story and Page?
This is Drupal way to insert a new node from code. 

&lt;?php
// add node properties
$newNode = (object) NULL;
$newNode-&gt;type = '{NODE_TYPE}';
$newNode-&gt;title = '{NODE_TITLE}'
$newNode-&gt;uid = {USER_ID};
$newNode-&gt;created = strtotime("now");
$newNode-&gt;changed = strtotime("now");
$newNode-&gt;status = 1;
$newNode-&gt;comment = 0;
$newNode-&gt;promote = 0;
$newNode-&gt;moderate = 0;
$newNode-&gt;sticky = 0;

// add CCK field data
$newNode-&gt;field_{YOUR_CUSTOM_FIELD_1}[0]['value'] = '{DATA_1}';
$newNode-&gt;field_{YOUR_CUSTOM_FIELD_2}[0]['value'] = '{DATA_2}';

// save node
node_save($newNode);
?&gt;


Best of luck with Drupal. 

You will need to refer Creating Drupal 7.x modules