Skip to content

Database structure

DREVET Olivier edited this page Aug 10, 2022 · 6 revisions

This file describe the structure and explain the design choices of the databases.

For more information onto the databases structure you may open sql files in edict_database/data/init or open a .db with sqlite3 and use the .schema command.

kanji.db

ER Diagram

ERDiagram

kanji table primary key

the primary key of the kanji table is the kanji character.

For example, to get fields for the kanji "考", the SQL command will be :

SELECT * FROM kanji WHERE id="";

This may seems to be an odd choice but after all a kanji character :

  • Is uniq.
  • Is a unicode point, which is an integer.

Radical view

radical is a view of the kanji table.

However, there are 6 kanji which are not present in the kanjidic2 dictionary (ノハマユヨ|).

Those 6 kanji are added in the kanji table just after it's creation, by the data/init/kanji.sql file

Kanji Radical : N-N relation

A radical may be found in several kanji and a kanji may have several radicals, the table kanji_radical contains the correspondences between the kanjis and radicals.

Expression.db

ER Diagram

ER Diagram

Clone this wiki locally