Explanation of the concept of idiom decks using the analogy of database tables.
The idiom deck can be downloaded from 成語 (Traditional + Simplified) (+ Example Sentences) - AnkiWeb and then imported into Anki.

Basic concept: Quickly understand using the analogy of relational database tables
  1. Anki: A deck is defined by a note type. A note type contains field definitions and can have one or more card types.
  2. Database: A table contains multiple records, each with multiple fields. Multiple queries can produce different results based on different fields.

gh|900

1. Deck: Idioms

  • Treat a deck as equivalent to a database table.

▼ Idiom Deck

Traditional Simplified Explanation Example (Traditional) Example (Simplified)
難以置信 难以置信 hard to believe; incredible 看到比賽結果後,我們難以置信我們的隊伍竟然以絕對優勢獲勝。 看到比赛结果后,我们难以置信我们的队伍竟然以绝对优势获胜。
不可思議 不可思议 inconceivable; unimaginable; unfathomable 他的記憶力真是不可思議,只看一遍就能背下整篇文章。 他的记忆力真是不可思议,只看一遍就能背下整篇文章。
••• ••• ••• ••• •••

1.1. Data Content

  • One note = one record in the database table.

1.2. Note Type: Idioms

  • A note type consists of fields and card types.
  • A card type is composed of a front template, a back template, and a style template.

1.2.1. Fields

  • Equivalent to columns (schema) in a database table.
  • Example: The idiom deck (table) has fields for Traditional, Simplified, Explanation, Example (Traditional), and Example (Simplified).

1.2.2. Card Types

  • One note type can produce one or more card types.
  • Each card has a front and a back, defined by their respective templates, with optional style templates for appearance.
  • The front and back content can be any HTML, with {{Field Name}} representing the corresponding data from the note (record).

1.3. Generating Cards

  • This can be seen as the final query result.
  • Each card has only two outputs: front and back.
  • If the idiom deck has 200 notes and the note type has 2 card types, the output will be
    $200 \times 2 = 400$ cards.

2. Conclusion

  1. If Anki is viewed as a database, multiple decks are equivalent to multiple tables.
  2. Each table has defined fields and multiple records, analogous to a deck's note type and its notes.
  3. A database query result is equivalent to the cards generated in Anki.

💡 Related Links
Explanation article (Traditional Chinese)
Explanation article (English)
Explanation article (Japanese)

3. Tutorial Video

https://youtu.be/e9rSaBUX6TU