Entity-Relationship Model for Chat-Database
<p>I am creating an Application for my exam and I am implementing a chat-function. (As Simple As Possible)</p>

<p>Now I need to create an <code>Entity-Relationship-Model</code></p>

<p>Therefore I have these entities:</p>

<p><code>chatgroups</code> <code>chatmessages</code> and <code>chatusers</code></p>

<p>I have created this ER-Model:</p>

<p><a href="https://i.stack.imgur.com/OBnFu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OBnFu.png" alt="enter image description here"></a></p>

<p>Can anyone please tell me if this is the correct way or if there is a more efficient or even better way to create this model?</p>

<p><strong>Best regards</strong></p>