Back

Discord App Database Design

For my 67-262 Database Design and Development course, my partner and I designed a relational database system that models core Discord functionality. We built an ERD representing users, servers, channels, messages, reactions, and permissions, then translated it into a fully normalized BCNF schema implemented in PostgreSQL.

Our physical model captured real Discord behaviors such as server membership, voice channels, and direct messages, supported by primary/foreign keys and a delete-account trigger to maintain referential integrity. We validated the design using SQL queries for common use cases—joining servers, sending messages, counting interactions, and ranking user activity with window functions.

This project strengthened my skills in relational modeling, normalization, and building production-ready database schemas.

Users:

  • Community Member

  • Content Creator

  • Server Administrator

Physical Model:

User Stories & Queries

You can see the other user stories and the code implementation in the Github

Relational Model:

Server(Server_id, date_created, server_name, server_desc)

In_server(Server_id, User_id, date_joined, can_chat, can_voice)

Users(User_id, Username, Status, Status_message, Email, Age, Pronouns)

Community_members(User_id)

Content_creators(User_id, affiliate_link, identification_status)

Administrators(User_id, identification_status)

Voice_channels(Voice_channel_id, Channel_name, Server_id)

In_voice_channel(Voice_channel_id, User_id)

Chat_channels(Chat_channel_id, Channel_name, server_id)

Messages(Message_id, message, time_sent, sender_id)

Reactions(reaction_id, reaction_emoji, time_added, message_id, user_id)

Channel_messages(message_id, chat_channel_id)

Dm_messages(message_id, receiver_id)

Previous
Previous

2015 Police Killings Statistical Report

Next
Next

Anonymity Effect on Self-Censorship in Student Groups