5 Original JMdict XML format (summarized)
\r
6 =======================================
\r
38 * xref* # not sure why it's (#PCDATA)*...
\r
39 * ant* # not sure why it's (#PCDATA)*...
\r
49 Description of JMdict SQLite database design
\r
50 ============================================
\r
52 Basically, the table structure of the SQLite 3 database follows this
\r
53 very closely. Here's generally how it's designed:
\r
55 1. All tables (except entry) have two integer keys, always named id
\r
56 and fk. id is an auto-increment value, while fk is used for
\r
57 joining tables. (fk is of course indexed.)
\r
59 2. Any data with a one-to-one relationship with a parent XML node was
\r
60 moved into a column for the parent node's table. (Example: <keb>
\r
61 is now k_ele.value.)
\r
63 3. Attributes have similar but usually different names than in JMdict.
\r
64 Generally speaking, if an attribute had a prefix (like xml:lang or
\r
65 ls_wasei), it is stored without it (as lang or wasei).
\r
67 4. Info nodes have a one-to-one relationship with entries, so there's
\r
68 no table for them. XML children of the <info> element are linked
\r
69 directly to the entry table rather than to a meaningless
\r
75 Example 1: 魚 (entry 1578010)
\r
80 LEFT JOIN k_ele ON entry.id = k_ele.fk
\r
81 LEFT JOIN ke_inf ON k_ele.id = ke_inf.fk
\r
82 LEFT JOIN ke_pri ON k_ele.id = ke_pri.fk
\r
83 WHERE entry.ent_seq = 1578010
\r
87 ======== ============= ======== ======== =========== ========= ========= ============= ========= ========= ============
\r
88 entry.id entry.ent_seq k_ele.id k_ele.fk k_ele.value ke_inf.id ke_inf.fk ke_inf.entity ke_pri.id ke_pri.fk ke_pri.value
\r
89 ======== ============= ======== ======== =========== ========= ========= ============= ========= ========= ============
\r
90 55777 1578010 48939 55777 魚 None None None 42889 48939 ichi1
\r
91 55777 1578010 48939 55777 魚 None None None 42890 48939 ichi2
\r
92 55777 1578010 48939 55777 魚 None None None 42891 48939 news1
\r
93 55777 1578010 48939 55777 魚 None None None 42892 48939 nf03
\r
94 ======== ============= ======== ======== =========== ========= ========= ============= ========= ========= ============
\r