How can I create a Multi Language Dictionary Cross Crossble database?

This database should support a three-way cross-reference between Mongolian, English, Chinese, and also act as a dictionary for each language.

Information encoded for English includes such things as: Word, IPA pronunciation (s), definition (s), sample sentence (s), multiple pronunciation, multiple pronunciation, synonyms, antonyms, word type, study note (s) ), Chinese equivalent (s), Mongolian C. equivalent (s), Mongolian S. equivalent (s)

Chinese : traditional character, simplified character, definition (s), pinyin pronunciation, example (s), synonyms, antonyms, HSK test level, strokes, radicals (radicals), search radical, combination of dimensional words, word type, simple character explanation, in-depth explanation of nature, study note, English equivalent (s), Mongolian C. equivalent (s), Mongolian S. equivalent (s)

Mongolian Cyrillic : Cyrillic word, Cyrillic definition, Cyrillic definition (s), Cyrillic examples, c. synonyms c. antonyms, Chinese equivalents, inner Mongolian (script) equivalent meaning, Mongols script equivalent spelling, Eng. Equiv. (S) Chin. Eqiv. (WITH)

Mongolian script : script, script alternative ending, script definition (s), script definition (s), p. synonyms, p. antonyms word type, study notes, eng. Equiv. (S) Chin. Eqiv. (S), external Mongolian (Cyrillic) equivalent meaning (s), Mongolian Cyrillic equivalent spelling.

I am very new to working with databases. At first I considered creating a table for each language, but this leaves a problem with all plural elements. Now I wonder if I need a table for each element of each language, so that I canโ€™t help but include all the information I need. I thought for each entry the connection between the languages โ€‹โ€‹would be the base of the ID / PK on it.

  • Do I have the right idea with a database?
  • If I want to include this great information, then every element that can include multiple values โ€‹โ€‹needs its own table, doesn't it?
  • But itโ€™s true that editing this should be simple, if each of them is associated with PK, I can edit all values โ€‹โ€‹from the language (or cross-language) from one interface, right?
  • How about a problem with not knowing how many records can be. For example, some words may have more equivalents or more synonyms for the language than others. Is this a problem, or are you just adding more columns to the table, no problem?
+4
source share
1 answer

I would like to have a single structure for all languages. This will simplify the work, and also write an editor for him.

Also, I would normalize the attributes, so you didn't have many duplicate or unused columns. It also helps in cases where an attribute can have multiple values, such as multiple definitions or multiple plural forms.

This is how I get started, I leave many constructive solutions open, for example, do I always use number identifiers, foreign key restrictions, etc. I highlighted the table name and primary key (s).

  • Table: word_language (domain table)
    • word_id : number, automatic addition is possible. primary key, FK for word_attributes
    • language (_id): either a string (for example: "english"), or FK in the "domain language table", or both
    • name (optional, may also be an attribute): string, word (for example: "lamp")
  • Table: word_attributes (one for many)
    • word_id : primary key, FK - word_language
    • (_id | _key): either FK for the domain table "attributes", a string (for example: "plural"), or both
    • attribute_value: string, actual value (for example: "lamps")
  • Table: Languages (optional, domain table)
    • language (_id) : either an automatically increasing number or a string (for example: English) primary key
    • name (optional, use if language if is id): string (for example: "english"), etc.
    • (other useful columns describing languages)
  • Table: Attributes (optional, domain table)
    • attribute (_id | _key) : number or string, primary key
    • language (_id) (optional): simplifies the search for language attributes, part of the primary key
    • description: describe the attribute, which may appear in the editing tool
  • Table: equivalents (optional, many for many, may also be an attribute)
    • source_word_id : primary key of a word
    • destination_word_id: equivalent word in another language
+4
source

Source: https://habr.com/ru/post/1380277/


All Articles