If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > cgi txt db to mysql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-27-04, 03:12
erhanharputlu erhanharputlu is offline
Registered User
 
Join Date: Sep 2004
Posts: 2
cgi txt db to mysql

hi there..

i have a cgi database..
the cgi reads the datareh.txt file...
the txt file is fielded with | |
the database txt file fields is made of city-phone-fax-address-company name-keywords-sector etc..
like this;

Istanbul|Sampiyon Sarkuteri|Buyukdere C N70/A Mecidiyekoy|0212 2753164||istanbulgidasanayiureticilerivesaticilari |gidasanayiureticilerivesaticilari dnt|konserveciler yemekler gidacilar gidalar pastaneciler pastaneler kuruyemisciler cikolatalar copsisler donerler izgaralar yagcilar mantarlar dondurmacilar uncular sekerciler pekmezciler baharatcilar tavukcular ureticileri saticilari|canned food tinned nourishment bakery dried fruit chocolate ice cream flour sugar spices|conserve conservele mincari alimente cofetarie fructe uscate alune chocolate doner gratar ciuperci ulei ingetata faina dulciuri dulce dulceata pui gaina mirodenie produse producatori| | |

when someone search for something the cgi reads the txt file and copy the line to search results...

ok my question is how to convert this txt file to mysql database...
this database is terrible bec. when I want to change something or add another company i add or change the datareh.txt file in my local drive and upload it to server everytime..and it is 36 mb..!!!!

i think i have two possibility..first to change the database to mysql....second find a way to add the 36 mb datareh.txt file online..(it is nearly impossible to add it with online txt editor scripts bec of its size i think)

i hope you understand my problem...any help will be usefull..thanks for spending time...
Reply With Quote
  #2 (permalink)  
Old 09-27-04, 14:27
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
create the table first in mysql then use the LOAD DATA INFILE to bring your text file into the mysql database table.

I would do that first because you then have all the data into mysql to work with.

You then can figure out what tables you need to move your database towards normalization. you can then do a select out of this first table on only the fields you need for each of the other tables.

(i.e. you might want to create one for contact info of each supplier, you would then only select the fields from the master table that you would need in the contact table. you could assign an autoincrement field or something to identify the suppliers or whatever).

finally, when you are happy with all your other tables you can delete the initial table from your database.
Reply With Quote
  #3 (permalink)  
Old 09-27-04, 17:45
erhanharputlu erhanharputlu is offline
Registered User
 
Join Date: Sep 2004
Posts: 2
as i said before the file is 36 mb...
creating tables from that one make sense..

offf very mixy..i think i need more explanation...
Reply With Quote
  #4 (permalink)  
Old 09-27-04, 18:07
erhanharputlu erhanharputlu is offline
Registered User
 
Join Date: Sep 2004
Posts: 2
as i said before the file is 36 mb...
creating tables from that one make sense..but uploading 36mb....

offf very mixy..i think i need more explanation...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On