<table><tr><td style="">pablo created this task.<br />pablo triaged this task as "Normal" priority.
</td></tr></table><br /><div><strong>TASK DESCRIPTION</strong><div><p>This is an initial review of the Akonadi/MySQL Entity-Relationship Diagram (ERD).</p>

<p><strong>Model Notation</strong><br />
<a href="https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model#Crow's_foot_notation" class="remarkup-link" target="_blank" rel="noreferrer">Crow's Foot</a></p>

<p><strong>Crow's Foot Refresher</strong><br />
The symbols at the end of each relationship define the minimum and maximum cardinality:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">| - one</li>
<li class="remarkup-list-item">o = zero</li>
<li class="remarkup-list-item">< = many</li>
</ul>

<p>For example given the following:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">[parent]-------o<[child]</pre></div>



<ul class="remarkup-list">
<li class="remarkup-list-item">Each <strong>[parent]</strong> may have <em>zero to many</em> <strong>[child]</strong>'s</li>
<li class="remarkup-list-item">Each <strong>[child]</strong> may have <em>one and only</em> one <strong>[parent]</strong></li>
</ul>

<p><strong>Observations</strong></p>

<ul class="remarkup-list">
<li class="remarkup-list-item">There are many standalone entities (e.g. <strong>[collectionpimitemrelation]</strong>, <strong>[tagtypetable]</strong>, <strong>[parttable]</strong>, etc).  I would think that <em>somehow</em> they would be related to some other entity.</li>
<li class="remarkup-list-item">Perhaps this is my own ignorance of Akonadi but at first blush, I see several <em>islands</em> of relationships.  For example, here are couple:<ol class="remarkup-list">
<li class="remarkup-list-item"><strong>[resourcetable]/[tagremoteidresourcerelationtable]</strong></li>
<li class="remarkup-list-item"><strong>[collectiontable]/[pimitemtable]/[relationtable]/[pimitemtagrelation]/[mimetypetable]</strong></li>
</ol></li>
<li class="remarkup-list-item">The relationship <strong>[mimetypetable]/[pimitemtable]</strong> is defined such that we can have a <strong>[pimitemtable]</strong> row with no <strong>[mimetypetable]</strong> defined.  I suspect that this is per specification but I want to be sure.  :)</li>
<li class="remarkup-list-item"><em>Minor</em> - personally, I don't like to embed the type of object in the name of the object.  For example, <em>collection<strong>table</strong></em>.  This is admittedly a nitpick.  ;)</li>
<li class="remarkup-list-item"><em>Minor</em> - personally, it would be great to use underscores to separate names.  I find it far easier to read <strong>[tag_remote_id_resource_relationship_table]</strong> than <strong>[tagremoteidresourcerelationshiptable]</strong>  This is yet-another-nitpick.</li>
</ul>

<p><a href="https://phabricator.kde.org/F5685689" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">F5685689: akonadi-mysql.pdf</a></p></div></div><br /><div><strong>TASK DETAIL</strong><div><a href="https://phabricator.kde.org/T7846" rel="noreferrer">https://phabricator.kde.org/T7846</a></div></div><br /><div><strong>To: </strong>pablo<br /><strong>Cc: </strong>kde-pim, pablo<br /></div>