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 8317875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:45:20+00:00 2026-06-08T21:45:20+00:00

I’m currently setting up SQL tables for language listing that will serve as a

  • 0

I’m currently setting up SQL tables for language listing that will serve as a framework for translation efforts of my web application in the near future.

The tables and fields I’ve decided to create look like this:

Language
--------
Language ID
Language name
Native name

Region
------
Language ID
Region

Active
------
Language ID
Active

Language ID would the primary key in both tables.

The active field in the active table simply allows me to know which languages have been been translated (denoted by 1) and which haven’t.

Sample data would look something like this:

Language table

Language ID  Language name   Native name
-----------  -------------   -------------
afr          Afrikaans       Afrikaans
sqi          Albanian        gjuha shqipe
ara          Arabic          العربية

Region table

Language ID  Region 
-----------  -------------   
afr          Africa       
sqi          Eastern Europe
ara          Middle East

Active table

Language ID  Active
-----------  -------------   
afr          0
sqi          1
ara          0

There plans to be a fixed number of languages and regions. The languages I plan to add to the database (for later translation use) include (all their codes will be garnered from the ISO 639-2/B column which can be found here: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes):

Afrikaans
Albanian
Arabic
Belarusian
Bulgarian
Catalan
Chinese (simplified)
Chinese (traditional)
Croatian
Czech
Danish
Dutch
English
Estonian
Esperanto
Filipino
Finnish
French
Galician
German
Greek
Hebrew
Hindi
Hungarian
Icelandic
Indonesian
Irish
Italian
Japanese
Korean
Latvian
Lithuanian
Macedonian
Malay
Maltese
Norwegian
Persian
Polish
Portuguese
Romanian
Russian
Serbian
Slovak
Slovenian
Spanish
Swahili
Swedish
Thai
Turkish
Ukrainian
Vietnamese
Welsh
Yiddish

The region categories include:

All
Africa 
Middle East
Americas
Asia-Pacific
Eastern Europe
Western Europe

My question is now have I fully normalised this table? Can it be normalised any further or made any more efficient. I would appreciate any suggestions before I go about setting it up.

  • 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-06-08T21:45:23+00:00Added an answer on June 8, 2026 at 9:45 pm

    If you are using languageID as the PK in multiple tables you are not properly normalized.

    Is the active table just supposed to indicate if the language is active or not? if so active should just be a field in the language table.

    Region table should be regionID, region.

    Another table should be added that links a region to a language which would only contain the columns languageID and regionID, the pk should be a combined key of regionID and languageID. This will allow you the ability to extend to better represent the many to many relationship that is language to region.

    By Request (and some minor changes I would make):

    In you example it’s not obvious why you would want a link table, but think of it when you get to “the americas” region, you actually need to have multiple languages as each country may speak English, Spanish, French or Portuguese. And even when you break it down to a country, Canada would need both French and English. Also Spanish is going to be in multiple regions, Europe and The Americas. The link table will better represent this.

    Language ID should be an int, even if the 3 letter abbreviation is unique, Most SQL engines will be able to join on ints faster so your language table should be:

    Language ID  Language Code  Language name   Native name   Active
    -----------  -------------  -------------   ------------  ------
    1            afr            Afrikaans       Afrikaans     0
    2            sqi            Albanian        gjuha shqipe  1
    3            ara            Arabic          العربية
    4            spa            Spanish         Espanol       1
    5            eng            English         English       1
    

    I can’t seem to put a 0 in the active field after Arabic, whatever ASCII that squiggle is doesn’t play nice, so just imagine that it’s there.

    Your region table should be simply:

    Region ID  Region 
    ---------- -------------   
    1          Africa       
    2          Eastern Europe
    3          Middle East
    4          Americas
    5          Western Europe
    

    Now you want a link table, which would basically be:

    Region ID  Language ID
    ---------  -----------
    1          1
    2          2
    3          3
    4          4
    4          5
    5          4
    5          5
    

    So you can see this better represents that multiple languages may be used in the same region, and a language may be used in multiple locations.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I am currently running into a problem where an element is coming back from

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.