Skip to content

About Messages Table

Mohammed Gomaa edited this page Oct 3, 2024 · 2 revisions

Explanation

  1. Looking at messages table in ERD, one can't help but think... how many Nullable FKs it is going to eventually have? How would that effect contributors to the project? Will it make our lives harder?

Current Schema

  1. Caveat more than one nullable Foreign key that will need to be validated by application-level.
  2. Advantage adding more features (maybe: forums?, threads?, ...) in the future means that we will add a new table + another nullable FK in messages table.

A discussed alternative (1)

  • Do note that this doesn't have to represent valid ERD. It is for demonstration purposes. disworse-messages-table-alternative
  1. Advantage messages have only one not null FK.
  2. Caveat with each new feature you might be adding two new tables.
  3. Do note, that the new relation table may not mean actual M-N relation.

Decision

  1. ...

Sources

  1. Discord thread - 1
  2. Discord thread - 2