XML+DTD to mySQL conversion

Posted on 2009-04-28
Last Modified: 2012-05-06
Dear experts,

I've got a fairly advanced XML document, and I would like to get this document ported to mySQL. Now I'm expecting to have to manually map entities to tables and create a shitload of extra tables to map relations....but I figure it'd be worth a shot asking here if someone knows of a good tool to help me with this conversion. And perhaps some other tips/ideas. I know, XML rocks, and usually the conversion is the other way around...but I'm afraid there is no other way. I've included a small part of the DTD for the XML doc as an example.
<!ELEMENT entry      (biblref, bdate, thesid+, analytic?, (monogr, series*)+, 

                                                      (note|idno)*)                  >

<!ELEMENT biblref    (#PCDATA | em)*                                              >	 

<!ATTLIST biblref  id    ID                             #REQUIRED

                   name  CDATA                          #REQUIRED                    >

<!ELEMENT bdate      (#PCDATA)                                                    >

<!ELEMENT thesid     (#PCDATA)                                                    >

<!ENTITY % title "title">

<!ELEMENT title      (#PCDATA | em | sup)*                                    >

<!ATTLIST   title   type   (ana|mon|ser|txt|col)           #REQUIRED   >

Open in new window

Question by:Azhrei1
    LVL 20

    Expert Comment

    I remember a tool from Altova ... Map Force.
    LVL 20

    Accepted Solution

    As this is a commercial (and as it's from Altova ... propable pretty expensive) ... I just googled a little. Maybe this helps:
    LVL 6

    Author Closing Comment

    I decided to go the manual way. There are alot of tools, but those I tried rarely got an efficient mySQL design. They did give me ideas though, on which to base my own design. Translating elements to tables, attributes or single sub elements to collums and translating deeper elements with new tables and coupling them with a relational table. (FKEY1, FKEY2)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
    This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now