Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should be able to find some tools online that can do this, especially with the interest in XML databases a while back.</p> <p>Here are two links to get you started:</p> <p>A tool with a feature that can do this: <a href="http://www.oxygenxml.com/xml_editor/database_to_schema.html" rel="nofollow noreferrer">http://www.oxygenxml.com/xml_editor/database_to_schema.html</a></p> <p>A discussion relating to this, albeit for SQL-server: <a href="https://stackoverflow.com/questions/1632347/get-xml-schema-from-database-schema-sql-server-2008-diagram">Get XML schema from database schema (SQL Server 2008 diagram)</a></p> <p>If you include your platform, more help may be possible.</p> <p><strong>EDIT</strong></p> <p>From your response, it sounds like you just want an idea of how you should set up the fields in your XML. The short answer is any way you want to. The longer answer is it depends on what you want to feed the XML to. </p> <p>You could try to do your mappings according to this proposal: <a href="http://www.w3.org/1999/07/20-XML-DB-Mapping" rel="nofollow noreferrer">http://www.w3.org/1999/07/20-XML-DB-Mapping</a></p> <p>If you just want an idea of how you could represent a database schema in XML, then something like the below can work for your Account table. For illustrative purposes, I'm pretending aid is your primary key and id is a foreign key that links with Transaction.tid:</p> <pre><code>&lt;dbTable name="Account"&gt; &lt;column name="aid" type="int" primaryKeyKey="true" /&gt; &lt;column name="title" type="varchar(255)" /&gt; &lt;column name="balance" type="float" /&gt; &lt;column name="id" type="int" foreignKey="Transaction.tid" /&gt; &lt;/dbTable&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload