As an anonymous user, you can only add new data. If you would like to also modify existing data, please create an account and indicate your languages on your user page.

Help:Defined Meaning table

From OmegaWiki
Jump to: navigation, search
Help:Index Database layout Defined Meaning table



The Defined Meaning table tracks the concept and link to their definitions.

+-----------------------+-----------------+------+-----+---------+-------+
| Field                 | Type            | Null | Key | Default | Extra |
+-----------------------+-----------------+------+-----+---------+-------+
| defined_meaning_id    | int(8) unsigned | NO   | MUL | NULL    |       | 
| expression_id         | int(10)         | NO   | MUL | 0       |       | 
| meaning_text_tcid     | int(10)         | NO   |     | 0       |       | 
| add_transaction_id    | int(11)         | NO   | MUL | NULL    |       | 
| remove_transaction_id | int(11)         | YES  | MUL | NULL    |       | 
+-----------------------+-----------------+------+-----+---------+-------+

[edit] Fields

defined_meaning_id 
A number that identifies the current defined_meaning.
expression_id 
Identifies the first Expression that was entered for that concept. The idea was to track the original words that was supposed to be defined and avoid Help:Semantic drift. However, many defined_meaning have been changed to mean something different, and therefore this value should not be relied upon (in my opinion, even deleted).
meaning_text_tcid 
A reference to entries in the Translated Content table that contains links to all the definitions of the concept in all the languages.
add_transaction_id 
Indicates when and by who the syntrans was added. See Transactions table.
remove_transaction_id 
Indicates when and by who the syntrans was removed. NULL if the syntrans is still valid.

[edit] Sample MySQL queries

[edit] Retrieving a definition of a Defined Meaning

Let's consider the example where you want to retrieve the English definition of DefinedMeaning:dictionary_(915)

  • select * from uw_defined_meaning where defined_meaning_id = 915 ;
returns one entry with meaning_text_tcid = 150085 ;
  • select * from uw_translated_content where translated_content_id = 150085 and remove_transaction_id is NULL;
This returns a list of several entries with language_id and text_id.
Then if you want for example the definition in English (language_id = 85, text_id = 278237),
  • select text_text from uw_text where text_id = 278237 ;

So, the complete query is:

select uw_text.text_text

from uw_text, uw_translated_content, uw_defined_meaning
where uw_defined_meaning.defined_meaning_id = 915
and uw_defined_meaning.meaning_text_tcid = uw_translated_content.translated_content_id
and uw_translated_content.language_id = 85
and uw_translated_content.remove_transaction_id is NULL
and uw_text.text_id = uw_translated_content.text_id ;

which returns A reference book containing an explanatory alphabetical list of words, identifying usually, the phonetic, grammatical, and semantic value of each word, often with etymology, citations, and usage guidance and other information..

Personal tools
Namespaces

Variants
Actions
Navigation
Contributing
Toolbox
  • What links here
  • Related changes
  • Special pages
  • Printable version