>
 >
 >
 >----Original Message Follows----
 >From: "Rodney Broom" <[EMAIL PROTECTED]>
 >To: <[EMAIL PROTECTED]>
 >Subject: Re: uploading 200,000 x 5 rows
 >Date: Thu, 13 Sep 2001 18:42:22 -0700
 >
 >Hi Carlos,
 >
 >I'm glad to help, but I'd like to clarify several things, first.
 >
 >thanx a lot ;)
 >
 > > ...with about 200,000 data about books
 > > (title, clasif, year, publisher, authors, subjects, etc etc)
 >
 >So you have a single file with data for multiple tables?
 >
 >Yeah indeed, imagine an old bibliographical card, well i have a file with
 >200,000 consecutive cards.
 >
 > >   After each sequential parsing (one book)
 >
 >What defines one book? One file, several records from one or more files, 
or
 >one record from a single file?
 >
 >I have a file something similar to:
 >-------------------------------------------------------
 >Classification: QAT67.0
 >Title: History of America          System key: tyup
 >Authors:   Broom, Rodney. Proal, Carlos
 >Subjects:  History, Social Sciences
 >...other fields
 >
 >Classification: QE56.0
 >Title: Mysql                      System key: iuds
 >Authors:   Broom, Rodney. Dubois, Paul
 >Subjects:  Computer Science, History
 >...other fields
 >
 >...200,000 records like these
 >--------------------------------------------------------
 >
 >After each parsing (just reading one record) i have a java object
 >containing:
 >    Book information: title, classif, systemkey, etc
 >    Book's authors: array of [author1,author2]
 >    Book's subjects: array of [subject1,subject2]
 >
 > > i upload that info to the database
 >
 >You "upload"? How is this done, exactly? Do you mean that you run mysql 
from
 >one machine with the host set for another machine?
 >
 >   when i begin the whole process i open a connection to the DB by java
 >using localhost (i work on the same machine).
 > > ...but in 5 tables...
 >
 >So you've split your data into sets that need to get loaded into five
 >destination tables, or you upload five sets of data?
 >
 >the first one, i need to split into five tables.
 >
 > > (verifying duplication, ids, etc):
 >
 >Does this mean that you are checking for  duplicates before loading into
 >MySQL?
 >
 >   yep
 >  let me explain, i have a kind of do-while statement like these:
 >
 >      open connection to db
 >      while (still records in the file)
 >      {
 >         parse one record
 >           insert book information into table book (classif, title, year,
 >etc)
 >           for(each author (current book))
 >           {
 >                 if author currently in db (through a select)
 >                         get authorID
 >                 else
 >                     authorID= insert author into table author (id
 >authorname)
 >                 insert into table book_author (authorID, classif) ->
 >relationship
 >           }
 >
 >           ...subjects with similar "for" that authors
 >       }
 >      close connection to db
 >
 >thanx again
 >
 >
 >
 >_________________________________________________________________
 >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 >
 >
 >---------------------------------------------------------------------
 >Before posting, please check:
 >   http://www.mysql.com/manual.php   (the manual)
 >   http://lists.mysql.com/           (the list archive)
 >
 >To request this thread, e-mail <[EMAIL PROTECTED]>
 >To unsubscribe, e-mail 
<[EMAIL PROTECTED]>
 >Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 >
 >


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to