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

  • SEARCH
  • Home
  • 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 693815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:47:33+00:00 2026-05-14T02:47:33+00:00

I have this data from a xml file: <?xml version=1.0 encoding=utf-8 ?> <words> <id>…</id>

  • 0

I have this data from a xml file:

<?xml version="1.0" encoding="utf-8" ?>
<words>
    <id>...</id>
    <word>...</word>
    <meaning>...</meaning>
    <translation>
        <ES>...</ES>
        <PT>...</PT>
    </translation>
</words>

This forms the table named “words”, which has four fields (“id”,”word”,”meaning” and “translation”). On the other hand, the “translation” field can hold several languages like ES,PT,EN,JA,KO,etc… So I create a table (“words.translation”, one field is “id” and the others ones are languages ids like “ES”,”PT”,…).

I’m sorry for this newby question, but I’d like to know a couple of things about this one-to-many relationship.

  1. How to join (or link?) this two tables in MySQL?
  2. What information does the “translation” field in the “words” table has to store?
  3. How is the sql query to get all the word information (JOIN syntax used?)

Thanks for your patience.

  • 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-14T02:47:33+00:00Added an answer on May 14, 2026 at 2:47 am

    I’ll try to answer …

    1. How to join (or link?) this two tables in MySQL?

    You can link the two tables by declaring a foreign key constraint between the ‘word_id’ in the TRANSLATION table and the ‘id’ field in in the WORD table.

    1. What information does the “translation” field in the “words” table has to store?

    since there are many translations and only one ‘original’ word in the design you propose, the link will be from translation (many) to word (one), the link is the ‘word_id’ I mentioned under 1.
    Please note that a different design with only one single table that contains ‘word,meaning,language’ and a meaning_id to self-join translations, might be better for words with multiple translations/meanings.

    1. How is the sql query to get all the word information (JOIN syntax used?)

    assuming two tables, word and translation, the syntax would be

    select w.word, w.meaning, t.language, t.word 
      from WORD as w
      join TRANSLATION as t 
        on (w.id = t.word_id)
    

    caveat: your design assumes that there will always be a on to one translation from one language to another. Un?-fortunately that is not true.

    Each word has a set of co-meanings that differ from language to language, your meaning field implies that you are aware of this.


    Table WORD: id | word | meaning
        PK on word_id

    Table TRANSLATION word_id | language | word
        PK on (word_id,language), FK word_id -> WORD

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

Sidebar

Related Questions

I have to parse an XML document that looks like this: <?xml version=1.0 encoding=UTF-8
I have a web service that queries data from this json file, but I
i have this in my BlogRepository public IQueryable<Subnus.MVC.Data.Model.Post> GetPosts() { var query = from
I have a query like this: SELECT TABLE_NAME, COLUMN_NAME, IS_NULLABLE, DATA_TYPE FROM MY_DB.INFORMATION_SCHEMA.COLUMNS WHERE
I have this big data-entry sort of page, a table kind of layout using
I have this Javascript data: [{id:123,type:test},{id:154,type:another}] How would you transform that into something so
We have this set of data that we need to get the average of
I have this scenario where I need data integrity in the physical database. For
we have this scenario: A server which contains needed data and client component which
I have this method on a webpart: private IFilterData _filterData = null; [ConnectionConsumer(Filter Data

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.