Skip to main content
Code Review

Return to Question

You don't need all of these HTML tags
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

Is correct structured my database structure, adding Adding words to the database and can it be able to work for my project?

Hello everybody! At first I immediately get outcreated a dictionary web app for makingmy language in PHP. At the beginning of the project I wanted to create not a mistakedictionary but a simple web application that would correct the words that were entered in the English languagewrong format by the user. SinceBut with time, the circumstances became shaky and I dofound good books on my topic and I decided to create everything in one. That is, a web application that corrects and translates a word. Well, of course it's just a translation by words and not yet know this language very welllike a clever translator like Google Translate.

Getting started...

I create a dictionary web app for my language in php. At the beginning of the project I wanted to create not a dictionary but a simple web application that would correct the words that were entered in the wrong format by the user. But with time, the circumstances became shaky and I found good books on my topic and I decided to create everything in one. That is, a web application that corrects and translates a word. Well, of course it's just a translation by words and not like a clever translator like Google Translate. Now Now I have words, a description of the words and an Arabic translation of these words. I have not yet decided how to create a structure for the database. Therefore I would like to advise on the structure of the database with you.

I

I myself came up with such a structure for the database of my project:

Database: "Translator""Translator":

Tables:

Tables:


 - words 
 - words translation
 - words description
 - synonyms of words
 - antonyms of words
  • Words
  • Words translation
  • Words description
  • Synonyms of words
  • Antonyms of words
Other tables are not created, that is, not yet invented.

Other tables are not created, that is, not yet invented.

"**words**":

 - id
 - word
"**words_translation**":

 - id
 - word_id
 - arabic
 - english
 - russian
 - france
"**words_description**":

 - id
 - word_id
 - description
"**synonyms_of_words**":

 - id
 - word_id
 - word_synonyms
"**antonyms_of_words**":

 - id
 - words_id
 - word_antonyms

I'm about to show my words so that you understand and appreciate the structure of the base for efficiency. Suitable for my requirements or not?!"Words":

  • id
  • word

In first step I add words (only words) to the database. Well, the list of words can be updated at any time. Because all existing words in my language can not be found in one time and added to the database."words_translation":

  • id
  • word_id
  • arabic
  • english
  • russian
  • france

"words_description":

  • id
  • word_id
  • description

"synonyms_of_words":

  • id
  • word_id
  • word_synonyms

"antonyms_of_words":

  • id
  • words_id
  • word_antonyms

I'm about to show my words so that you understand and appreciate the structure of the base for efficiency. Is it suitable for my requirements or not?

In the first step I add words (only words) to the database. The list of words can be updated at any time. Because all existing words in my language can not be found in one time and added to the database.


 --------------
 [id] | [word]
 --------------
 [11] | [тоҷик]
 [12] | [ӯзбек]
 [13] | [падар]
 [14] | [модар]
 [15] | [китоб]
 [16] | [қалам]
 [17] | [ручка]
 --------------
 --------------
 [id] | [word]
 --------------
 [11] | [тоҷик]
 [12] | [ӯзбек]
 [13] | [падар]
 [14] | [модар]
 [15] | [китоб]
 [16] | [қалам]
 [17] | [ручка]
 --------------

After adding the words, I will individuallyindividually add their descriptiondescription to the table with descriptions of the words:


 ---------------------------------------
 [id] | [word_id] | [description]
 ---------------------------------------
 [1] | [11] | [Миллати давлати...]
 [2] | [12] | [Ӯзбекистон давл...]
 [3] | [13] | [Шахсе ки сарвар...]
 [4] | [14] | [Инсоне мобошанд...]
 [5] | [15] | [Китоб - ин пред...]
 [6] | [16] | [Предмети барои ...]
 [7] | [17] | [Предмет барои н...]
 ---------------------------------------
 ---------------------------------------
 [id] | [word_id] | [description]
 ---------------------------------------
 [1] | [11] | [Миллати давлати...]
 [2] | [12] | [Ӯзбекистон давл...]
 [3] | [13] | [Шахсе ки сарвар...]
 [4] | [14] | [Инсоне мобошанд...]
 [5] | [15] | [Китоб - ин пред...]
 [6] | [16] | [Предмети барои ...]
 [7] | [17] | [Предмет барои н...]
 ---------------------------------------

My tactic is the addition of a description of the words, as you understand by the key of the array. For example, first I find words (if there is such a word in the database, otherwise I first add it from the array key and then continue adding the description) and adding the identifier of that word to the field "word_id"word_id.

An example array for adding to the table with translations(arabic tr.arabic tr.):

Table "words_translation""words_translation" after adding an array of translation words in this form:

 --------------------------------------------------------------
 [id] | [word_id] | [arabic] | [english] | [russian] | [france]
 --------------------------------------------------------------
 [1] | [11] | [تاژيك] | [NULL] | [NULL] | [NULL]
 [2] | [12] | [اوزبيك] | [NULL] | [NULL] | [NULL]
 [3] | [13] | [پدر] | [NULL] | [NULL] | [NULL]
 [4] | [14] | [پدرماد] | [NULL] | [NULL] | [NULL]
 [5] | [15] | [الكتاب] | [NULL] | [NULL] | [NULL]
 [6] | [16] | [آبيار] | [NULL] | [NULL] | [NULL]
 [7] | [17] | [آبزن] | [NULL] | [NULL] | [NULL]
 ---------------------------------------------------------------
-------------------------------------------------------------- [id] | [word_id] | [arabic] | [english] | [russian] | [france] -------------------------------------------------------------- [1] | [11] | [تاژيك] | [NULL] | [NULL] | [NULL] [2] | [12] | [اوزبيك] | [NULL] | [NULL] | [NULL] [3] | [13] | [پدر] | [NULL] | [NULL] | [NULL] [4] | [14] | [پدرماد] | [NULL] | [NULL] | [NULL] [5] | [15] | [الكتاب] | [NULL] | [NULL] | [NULL] [6] | [16] | [آبيار] | [NULL] | [NULL] | [NULL] [7] | [17] | [آبزن] | [NULL] | [NULL] | [NULL] ---------------------------------------------------------------

What is your opinion about the structure of the database and about adding words to the database? Share with me with your advice please. Thank you in advance for the answers!

Is correct structured my database structure, adding words to the database and can it be able to work for my project?

Hello everybody! At first I immediately get out for making a mistake in the English language. Since I do not yet know this language very well.

Getting started...

I create a dictionary web app for my language in php. At the beginning of the project I wanted to create not a dictionary but a simple web application that would correct the words that were entered in the wrong format by the user. But with time, the circumstances became shaky and I found good books on my topic and I decided to create everything in one. That is, a web application that corrects and translates a word. Well, of course it's just a translation by words and not like a clever translator like Google Translate. Now I have words, a description of the words and an Arabic translation of these words. I have not yet decided how to create a structure for the database. Therefore I would like to advise on the structure of the database with you.

I myself came up with such a structure for the database of my project:

Database: "Translator":

Tables:

 - words 
 - words translation
 - words description
 - synonyms of words
 - antonyms of words
Other tables are not created, that is, not yet invented.
"**words**":

 - id
 - word
"**words_translation**":

 - id
 - word_id
 - arabic
 - english
 - russian
 - france
"**words_description**":

 - id
 - word_id
 - description
"**synonyms_of_words**":

 - id
 - word_id
 - word_synonyms
"**antonyms_of_words**":

 - id
 - words_id
 - word_antonyms

I'm about to show my words so that you understand and appreciate the structure of the base for efficiency. Suitable for my requirements or not?!

In first step I add words (only words) to the database. Well, the list of words can be updated at any time. Because all existing words in my language can not be found in one time and added to the database.


 --------------
 [id] | [word]
 --------------
 [11] | [тоҷик]
 [12] | [ӯзбек]
 [13] | [падар]
 [14] | [модар]
 [15] | [китоб]
 [16] | [қалам]
 [17] | [ручка]
 --------------

After adding the words, I will individually add their description to the table with descriptions of the words:


 ---------------------------------------
 [id] | [word_id] | [description]
 ---------------------------------------
 [1] | [11] | [Миллати давлати...]
 [2] | [12] | [Ӯзбекистон давл...]
 [3] | [13] | [Шахсе ки сарвар...]
 [4] | [14] | [Инсоне мобошанд...]
 [5] | [15] | [Китоб - ин пред...]
 [6] | [16] | [Предмети барои ...]
 [7] | [17] | [Предмет барои н...]
 ---------------------------------------

My tactic is the addition of a description of the words, as you understand by the key of the array. For example, first I find words (if there is such a word in the database, otherwise I first add it from the array key and then continue adding the description) and adding the identifier of that word to the field "word_id".

An example array for adding to the table with translations(arabic tr.):

Table "words_translation" after adding an array of translation words in this form:

 --------------------------------------------------------------
 [id] | [word_id] | [arabic] | [english] | [russian] | [france]
 --------------------------------------------------------------
 [1] | [11] | [تاژيك] | [NULL] | [NULL] | [NULL]
 [2] | [12] | [اوزبيك] | [NULL] | [NULL] | [NULL]
 [3] | [13] | [پدر] | [NULL] | [NULL] | [NULL]
 [4] | [14] | [پدرماد] | [NULL] | [NULL] | [NULL]
 [5] | [15] | [الكتاب] | [NULL] | [NULL] | [NULL]
 [6] | [16] | [آبيار] | [NULL] | [NULL] | [NULL]
 [7] | [17] | [آبزن] | [NULL] | [NULL] | [NULL]
 ---------------------------------------------------------------

What is your opinion about the structure of the database and about adding words to the database? Share with me with your advice please. Thank you in advance for the answers!

Adding words to the database

I created a dictionary web app for my language in PHP. At the beginning of the project I wanted to create not a dictionary but a simple web application that would correct the words that were entered in the wrong format by the user. But with time, the circumstances became shaky and I found good books on my topic and I decided to create everything in one. That is, a web application that corrects and translates a word. Well, of course it's just a translation by words and not like a clever translator like Google Translate.

Now I have words, a description of the words and an Arabic translation of these words. I have not yet decided how to create a structure for the database. Therefore I would like to advise on the structure of the database with you.

I myself came up with such a structure for the database of my project:

Database: "Translator":

Tables:

  • Words
  • Words translation
  • Words description
  • Synonyms of words
  • Antonyms of words

Other tables are not created, that is, not yet invented.

"Words":

  • id
  • word

"words_translation":

  • id
  • word_id
  • arabic
  • english
  • russian
  • france

"words_description":

  • id
  • word_id
  • description

"synonyms_of_words":

  • id
  • word_id
  • word_synonyms

"antonyms_of_words":

  • id
  • words_id
  • word_antonyms

I'm about to show my words so that you understand and appreciate the structure of the base for efficiency. Is it suitable for my requirements or not?

In the first step I add words (only words) to the database. The list of words can be updated at any time. Because all existing words in my language can not be found in one time and added to the database.

 --------------
 [id] | [word]
 --------------
 [11] | [тоҷик]
 [12] | [ӯзбек]
 [13] | [падар]
 [14] | [модар]
 [15] | [китоб]
 [16] | [қалам]
 [17] | [ручка]
 --------------

After adding the words, I will individually add their description to the table with descriptions of the words:

 ---------------------------------------
 [id] | [word_id] | [description]
 ---------------------------------------
 [1] | [11] | [Миллати давлати...]
 [2] | [12] | [Ӯзбекистон давл...]
 [3] | [13] | [Шахсе ки сарвар...]
 [4] | [14] | [Инсоне мобошанд...]
 [5] | [15] | [Китоб - ин пред...]
 [6] | [16] | [Предмети барои ...]
 [7] | [17] | [Предмет барои н...]
 ---------------------------------------

My tactic is the addition of a description of the words, as you understand by the key of the array. For example, first I find words (if there is such a word in the database, otherwise I first add it from the array key and then continue adding the description) and adding the identifier of that word to the field word_id.

An example array for adding to the table with translations(arabic tr.):

Table "words_translation" after adding an array of translation words in this form:

 --------------------------------------------------------------
 [id] | [word_id] | [arabic] | [english] | [russian] | [france]
 --------------------------------------------------------------
 [1] | [11] | [تاژيك] | [NULL] | [NULL] | [NULL]
 [2] | [12] | [اوزبيك] | [NULL] | [NULL] | [NULL]
 [3] | [13] | [پدر] | [NULL] | [NULL] | [NULL]
 [4] | [14] | [پدرماد] | [NULL] | [NULL] | [NULL]
 [5] | [15] | [الكتاب] | [NULL] | [NULL] | [NULL]
 [6] | [16] | [آبيار] | [NULL] | [NULL] | [NULL]
 [7] | [17] | [آبزن] | [NULL] | [NULL] | [NULL]
 ---------------------------------------------------------------

What is your opinion about the structure of the database and about adding words to the database?

deleted 30 characters in body
Source Link

      HelloHello everybody! At first I immediately get out for making a mistake in the English language. Since I do not yet know this language very well.

      GettingGetting started...

      I create adictionary web app for my language in php. At the beginning of the project I wanted to create not a dictionary but a simple web application that would correct the words that were entered in the wrong format by the user. But with time, the circumstances became shaky and I found good books on my topic and I decided to create everything in one. That is, a web application that corrects and translates a word. Well, of course it's just a translation by words and not like a clever translator like Google Translate.Now I have words, a description of the words and an Arabic translation of these words. I have not yet decided how to create a structure for the database. Therefore I would like to advise on the structure of the database with you.

      I myself came up with such a structure for the database of my project:

I create a dictionary web app for my language in php. At the beginning of the project I wanted to create not a dictionary but a simple web application that would correct the words that were entered in the wrong format by the user. But with time, the circumstances became shaky and I found good books on my topic and I decided to create everything in one. That is, a web application that corrects and translates a word. Well, of course it's just a translation by words and not like a clever translator like Google Translate. Now I have words, a description of the words and an Arabic translation of these words. I have not yet decided how to create a structure for the database. Therefore I would like to advise on the structure of the database with you.

I myself came up with such a structure for the database of my project: Database: "Translator":

      I'mI'm about to show my words so that you understand and appreciate the structure of the base for efficiency. Suitable for my requirements or not?!

      InIn first step I add words (only words) to the database. Well, the list of words can be updated at any time. Because all existing words in my language can not be found in one time and added to the database.

      AfterAfter adding the words, I will individually add their description to the table with descriptions of the words:

      MyMy tactic is the addition of a description of the words, as you understand by the key of the array. For example, first I find words (if there is such a word in the database, otherwise I first add it from the array key and then continue adding the description) and adding the identifier of that word to the field "word_id".

      SynonymsSynonyms and antonyms table, too, do not necessarily now describe. And now look at the translation table.

      MyMy web-app translate from one language into several languages. But here you can translate from Arabic to Russian, for example, or from Russian to French. After all, the identifier of the word belongs only to one single word. Well of course if that's the corresponding translation is!

      II have not yet created this whole structure practical and it's just so far just a structure created in a paper sheet. The construction of SQL queries is also not planned. Can I create good, fast and optimal queries in this my database structure for adding and extracting words from the database?

      WhatWhat is your opinion about the structure of the database and about adding words to the database? Share with me with your advice please. Thank you in advance for the answers!

      Hello everybody! At first I immediately get out for making a mistake in the English language. Since I do not yet know this language very well.

      Getting started...

      I create adictionary web app for my language in php. At the beginning of the project I wanted to create not a dictionary but a simple web application that would correct the words that were entered in the wrong format by the user. But with time, the circumstances became shaky and I found good books on my topic and I decided to create everything in one. That is, a web application that corrects and translates a word. Well, of course it's just a translation by words and not like a clever translator like Google Translate.Now I have words, a description of the words and an Arabic translation of these words. I have not yet decided how to create a structure for the database. Therefore I would like to advise on the structure of the database with you.

      I myself came up with such a structure for the database of my project:

Database: "Translator":

      I'm about to show my words so that you understand and appreciate the structure of the base for efficiency. Suitable for my requirements or not?!

      In first step I add words (only words) to the database. Well, the list of words can be updated at any time. Because all existing words in my language can not be found in one time and added to the database.

      After adding the words, I will individually add their description to the table with descriptions of the words:

      My tactic is the addition of a description of the words, as you understand by the key of the array. For example, first I find words (if there is such a word in the database, otherwise I first add it from the array key and then continue adding the description) and adding the identifier of that word to the field "word_id".

      Synonyms and antonyms table, too, do not necessarily now describe. And now look at the translation table.

      My web-app translate from one language into several languages. But here you can translate from Arabic to Russian, for example, or from Russian to French. After all, the identifier of the word belongs only to one single word. Well of course if that's the corresponding translation is!

      I have not yet created this whole structure practical and it's just so far just a structure created in a paper sheet. The construction of SQL queries is also not planned. Can I create good, fast and optimal queries in this my database structure for adding and extracting words from the database?

      What is your opinion about the structure of the database and about adding words to the database? Share with me with your advice please. Thank you in advance for the answers!

Hello everybody! At first I immediately get out for making a mistake in the English language. Since I do not yet know this language very well.

Getting started...

I create a dictionary web app for my language in php. At the beginning of the project I wanted to create not a dictionary but a simple web application that would correct the words that were entered in the wrong format by the user. But with time, the circumstances became shaky and I found good books on my topic and I decided to create everything in one. That is, a web application that corrects and translates a word. Well, of course it's just a translation by words and not like a clever translator like Google Translate. Now I have words, a description of the words and an Arabic translation of these words. I have not yet decided how to create a structure for the database. Therefore I would like to advise on the structure of the database with you.

I myself came up with such a structure for the database of my project: Database: "Translator":

I'm about to show my words so that you understand and appreciate the structure of the base for efficiency. Suitable for my requirements or not?!

In first step I add words (only words) to the database. Well, the list of words can be updated at any time. Because all existing words in my language can not be found in one time and added to the database.

After adding the words, I will individually add their description to the table with descriptions of the words:

My tactic is the addition of a description of the words, as you understand by the key of the array. For example, first I find words (if there is such a word in the database, otherwise I first add it from the array key and then continue adding the description) and adding the identifier of that word to the field "word_id".

Synonyms and antonyms table, too, do not necessarily now describe. And now look at the translation table.

My web-app translate from one language into several languages. But here you can translate from Arabic to Russian, for example, or from Russian to French. After all, the identifier of the word belongs only to one single word. Well of course if that's the corresponding translation is!

I have not yet created this whole structure practical and it's just so far just a structure created in a paper sheet. The construction of SQL queries is also not planned. Can I create good, fast and optimal queries in this my database structure for adding and extracting words from the database?

What is your opinion about the structure of the database and about adding words to the database? Share with me with your advice please. Thank you in advance for the answers!

Source Link

Is correct structured my database structure, adding words to the database and can it be able to work for my project?

      Hello everybody! At first I immediately get out for making a mistake in the English language. Since I do not yet know this language very well.

      Getting started...

      I create a dictionary web app for my language in php. At the beginning of the project I wanted to create not a dictionary but a simple web application that would correct the words that were entered in the wrong format by the user. But with time, the circumstances became shaky and I found good books on my topic and I decided to create everything in one. That is, a web application that corrects and translates a word. Well, of course it's just a translation by words and not like a clever translator like Google Translate. Now I have words, a description of the words and an Arabic translation of these words. I have not yet decided how to create a structure for the database. Therefore I would like to advise on the structure of the database with you.

      I myself came up with such a structure for the database of my project:

Database: "Translator":

Tables:
 - words 
 - words translation
 - words description
 - synonyms of words
 - antonyms of words
Other tables are not created, that is, not yet invented.

Tables structure:

"**words**":
 - id
 - word
"**words_translation**":
 - id
 - word_id
 - arabic
 - english
 - russian
 - france
"**words_description**":
 - id
 - word_id
 - description
"**synonyms_of_words**":
 - id
 - word_id
 - word_synonyms
"**antonyms_of_words**":
 - id
 - words_id
 - word_antonyms

      I'm about to show my words so that you understand and appreciate the structure of the base for efficiency. Suitable for my requirements or not?!

      In first step I add words (only words) to the database. Well, the list of words can be updated at any time. Because all existing words in my language can not be found in one time and added to the database.

Example of my words in the array:

$array_words = array
(
 'тоҷик',
 'ӯзбек',
 'падар',
 'модар',
 'китоб',
 'қалам',
 'ручка',
);

Table "words" after adding an array of words in this form:

 --------------
 [id] | [word]
 --------------
 [11] | [тоҷик]
 [12] | [ӯзбек]
 [13] | [падар]
 [14] | [модар]
 [15] | [китоб]
 [16] | [қалам]
 [17] | [ручка]
 --------------

      After adding the words, I will individually add their description to the table with descriptions of the words:

Example of description words in an array:

$array_words_description = array
(
 'тоҷик' => 'Миллати давлати Ҷумҳурии Тоҷикистон. Забони давлати мазкур.',
 'ӯзбек' => 'Ӯзбекистон давлати дар Осиёи маркази ҷойгиршуда. Забони давлатиашон забони ӯзбеки мебошад.',
 'падар' => 'Шахсе ки сарвари оила мебошад ва оилаи худро бо меҳру муҳаббат ва бо хӯрду - хӯрок таъмин менамояд.',
 'модар' => 'Инсоне мобошанд, ки мову шуморо ба дунё оварда ба воя мерасонанд. Бузургтарин шахс дар олам ин модар аст.',
 'китоб' => 'Китоб - ин предмете, ки ба ҳамаи мо илму маърифатро, донишу сабақро меомӯзонад.',
 'қалам' => 'Предмети барои нашитаҷот пешбинишуда.',
 'ручка' => 'Предмет барои навистан пешбини шудааст. Бисёртар ин предметро донишомӯзандагон истифода мебаранд.',
);

Table "words_description" after adding an array of words description in this form:

 ---------------------------------------
 [id] | [word_id] | [description]
 ---------------------------------------
 [1] | [11] | [Миллати давлати...]
 [2] | [12] | [Ӯзбекистон давл...]
 [3] | [13] | [Шахсе ки сарвар...]
 [4] | [14] | [Инсоне мобошанд...]
 [5] | [15] | [Китоб - ин пред...]
 [6] | [16] | [Предмети барои ...]
 [7] | [17] | [Предмет барои н...]
 ---------------------------------------

      My tactic is the addition of a description of the words, as you understand by the key of the array. For example, first I find words (if there is such a word in the database, otherwise I first add it from the array key and then continue adding the description) and adding the identifier of that word to the field "word_id".

      Synonyms and antonyms table, too, do not necessarily now describe. And now look at the translation table.

An example array for adding to the table with translations(arabic tr.):

$array_words_translation = array
(
 'тоҷик' => 'تاژيك',
 'ӯзбек' => 'اوزبيك',
 'падар' => 'پدر',
 'модар' => 'پدرماد',
 'китоб' => 'الكتاب',
 'қалам' => 'آبيار',
 'ручка' => 'آبزن',
);

Table "words_translation" after adding an array of translation words in this form:

 --------------------------------------------------------------
 [id] | [word_id] | [arabic] | [english] | [russian] | [france]
 --------------------------------------------------------------
 [1] | [11] | [تاژيك] | [NULL] | [NULL] | [NULL]
 [2] | [12] | [اوزبيك] | [NULL] | [NULL] | [NULL]
 [3] | [13] | [پدر] | [NULL] | [NULL] | [NULL]
 [4] | [14] | [پدرماد] | [NULL] | [NULL] | [NULL]
 [5] | [15] | [الكتاب] | [NULL] | [NULL] | [NULL]
 [6] | [16] | [آبيار] | [NULL] | [NULL] | [NULL]
 [7] | [17] | [آبزن] | [NULL] | [NULL] | [NULL]
 ---------------------------------------------------------------

      My web-app translate from one language into several languages. But here you can translate from Arabic to Russian, for example, or from Russian to French. After all, the identifier of the word belongs only to one single word. Well of course if that's the corresponding translation is!

      I have not yet created this whole structure practical and it's just so far just a structure created in a paper sheet. The construction of SQL queries is also not planned. Can I create good, fast and optimal queries in this my database structure for adding and extracting words from the database?

      What is your opinion about the structure of the database and about adding words to the database? Share with me with your advice please. Thank you in advance for the answers!

lang-php

AltStyle によって変換されたページ (->オリジナル) /