How can I improve my model for a vocabulary list?
<p>I am programming a small <strong>vocabulary viewer</strong> in Java. You can</p>

<ul>
<li>add vocabulary to a language</li>
<li>switch between languages</li>
<li>see an overview for each language (with many vocabulary)</li>
<li>watch vocabulary in detail</li>
</ul>

<p>The interesting thing is that I want to display the translation for <strong>all languages</strong> if a vocabulary has been added in many languages (I know that this can lead to wrong connections in terms of linguistics, but it’s just for training my Java skills anyway).</p>

<p>Currently I have the following classes:</p>

<ul>
<li><code>VocabularyList (Observable)</code>, which is just a list implementation for many <code>&lt;Vocabulary&gt;</code> with additional methods for retrieving by language etc. This list is observed by all my overview page, when something in this list changes, it refreshes the view.</li>
<li><code>Vocabulary</code> which uses <code>HashMap&lt;Language, ArrayList&lt;String&gt;&gt; meanings</code> to save all meanings <strong>in all languages</strong> (so e.g. I could say that <em>helfen</em> in German means the same as <em>help</em> or <em>aid</em> in English).</li>
<li><code>Language</code> which is only a class for representing a language (by ISO code and name)</li>
</ul>

<p>I also store everything in the <strong>same serialization file</strong> at the moment. I would like serialization instead of database to keep the whole thing easy.</p>

<p>However, I have the feeling that this model is totally wrong, because:</p>

<ul>
<li>I cannot access vocabulary for each languages separately (even though I have a selection field for the language in my program), so I have to iterate through the whole list each time the user watches the overview page</li>
<li>I always carry the overhead for all languages around even if somebody only watches the overview (and not a detail page with translations for all languages)</li>
</ul>

<p>However, I do not really know how I should implement it better, if I want to keep the relation between all different vocabulary languages.</p>

<p>The next idea is:</p>

<ul>
<li>Create one vocabulary list for <strong>each</strong> language</li>
</ul>

<p>But then the whole relationship stuff would be difficult. E.g. if I deleted a vocabulary from the <em>Russian list</em> I would have to delete all links to it from all other language lists.</p>

<p>What model design would you suggest? Am I totally of the way or is it already somehow correct? As web developer I have only worked with databases all the time (mostly relational), where in such a case I would just have to delete an entry in a many-to-many relationship table. But when working with objects everything seems different.</p>
