SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Sep 2010
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I import or convert it to mysql?

    Dmoz export file is too big for PHP I think.
    It is over 4GB and my PHP cannot handle such big XML file.

    How can I import or convert it to mysql?

    Or how can I using php 5.3 dump the odp data to mysql 5.0

  2. #2
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)
    Is the file local to the mysql database you will be importing to? Exactly what format is the file in? I'm thinking you should be able to do a command line import right from mysql. I've done this with CSVs of several gigs before.

  3. #3
    SitePoint Member
    Join Date
    Sep 2010
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by K. Wolfe View Post
    Is the file local to the mysql database you will be importing to? Exactly what format is the file in? I'm thinking you should be able to do a command line import right from mysql. I've done this with CSVs of several gigs before.
    The ODP(DMOZ) data file format is RDF. Url is http://rdf.dmoz.org/rdf/
    How can I using php 5.3 dump the odp data( file format is RDF) to mysql 5.0

  4. #4

  5. #5
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    You will likely need to get your head around SPARQL in order to break up the RDF and iterate through the file.

    This search RDF to SQL PHP turns up some solutions, including ARC2 which is designed for that type of work. Another search: PHP ARC2

    Setting it up might be a bit of a pain.

    IIRC there were online tools around to do this a few years ago.

    If the RDF is coming from a datastore with a SPARQL endpoint (which they usually do) then you might be able to grab the data over an API, and do it in chunks too.

  6. #6
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •