Skip to content

Data Normalization

Nantawan Paramapooti edited this page Dec 27, 2024 · 9 revisions

As most of the Translated Relations are already in 3NF form, we'll only focus on the Relations that needed 3NF

1-3 NF Processes

*data instances in the following examples are abstract values for demonstration, may not accurately reflects project's actual instances.

ChatRank (chatrank_id, chatrank_name, allowed_actions)

chatrank_id chatrank_name allowed_actions
1 member []
2 admin [delete_chatroom, change_chatroom_name]
3 moderator [change_chatroom_name]

1NF: All attributes contain atomic values.

  • allowed_actions can be divided into each allowed actions that holds bool value instead.
chatrank_id chatrank_name can_delete_chatroom can_change_chatroom_name
1 member false false
2 admin true true
3 moderator false true

2NF: No partial dependency on any subset of a primary key.

  • Since chatrank_id is the primary key, all non-key attributes (chatrank_name, delete_chatroom, change_chatroom_name) are fully dependent on chatrank_id.

3NF: No transitive dependency on non-key attributes.

  • There are no dependencies between non-key attributes; therefore, no transitive dependency exists.

Conclusion

Besides ChatRank, All Relations are already in its 3NF form from the UML design, no further changes needed.

Clone this wiki locally