Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6101329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:29:15+00:00 2026-05-23T13:29:15+00:00

how to make a good MySQL Database Table Structure from this XML-Code? <xml> <product>

  • 0

how to make a good MySQL Database Table Structure from this XML-Code?

<xml>
<product>
    <id>1</id>
    <name>Test 1</name>
    <description>
        <weight>120t</weight>
        <height>20cm</height>
    </description>
</product>
<product>
    <id>1</id>
    <name>Test 1</name>
    <description>
        <length>100m</length>
        <strength>99%</strength>
    </description>
</product>    </xml>

How to solve the description entries?
I’m not able to know how many and which description information is given total.

In my opinion:

Table products: id, name

Table description: id, pid (ProductID), label, value

What do you think about this? Or what would be best?

Thanks for help.
TIA,
Frgtv10

—– EDIT

How to solve something like this at its best way?

<product>
    <id>1</id>
    <name>Test1</name>
    <description>
        <width>100</width>
        <price>
            <euro>
                <catalog>100</catalog>
                <online>98</online>
            </euro>
        </price>
    </description>
</product>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:29:15+00:00Added an answer on May 23, 2026 at 1:29 pm

    Your structure looks good, personally I would drop the ‘id’ field of the ‘description’ table and rather use ‘ProductId’ + ‘label’ as the (now compound) primary key. But that’s just me and it limits your table to only have unique labels for each product.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I come from a mainly PHP background and make good use of the Apache
I'm needing to make this layout editor that uses a good bit of jQuery
I'm developing a store which gets its product info from lots of xml feed,
Are there any good language-agnostic distributed make systems for linux that are secure and
Are there any good tools to make css sprites? IDEALLY I'd want to give
What is the cheap and good way to make a serial (RS232) programmer for
I'm wondering what good ways there would be make assertions about synchronization or something
I'm wondering if it's a good idea to make verifications in getters and setters
What is a good regular expression that can validate a text string to make
Does anyone have any recommendations for a good, fast, make tool? SCons? KJam? Something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.