title: Read a text file and transfer contents to mysql database table using python
body: <p>I am new to data base handling using python programming.<br>
                    By using python programming ,i want to read raw text file which consist of STUDEN T_NAME,STUDENT_MARKS. Which are separated by pipe symbol(given as below Example),I want to push this data into student table consists of 2 columns (STUDENT_NAME,STUDENT_MARKS) with respective data values.</p>
  
  <p>input data file will be like this(it consists of some thousands of records like this),my input file is .Dat file ,its start only with records,each line contain 0 or more number of records(there is no fixed count of records on each line),there is no other keyword appear anywhere else :: </p>
  
  <blockquote>
    <p>records    STUDENT_NAME| jack | STUDENT_MARKS|200| STUDENT_NAME| clark
    |STUDENT_MARKS|200| STUDENT_NAME| Ajkir | STUDENT_MARKS|30| 
    STUDENT_NAME| Aqqm | STUDENT_MARKS|200| STUDENT_NAME| jone | 
    STUDENT_MARKS|200| STUDENT_NAME| jake | STUDENT_MARKS|100|</p>
  </blockquote>
  
  <p>Output mysql table table::</p>
  
  <blockquote>
    <h2>STUDENT_NAME| STUDENT_MARKS</h2>
  
  <pre><code> jack   |   200
   clark  |   200
  </code></pre>
    
    <p>.......</p>
  </blockquote>
  
  <p>please advice me to read file&amp;push data in efficient way.
  I would be so grateful if someone could give me script to achieve this.</p>