TELEGRAM
Analyzing Telegram’s Data Model and Relationships
CREATED BY -
DEEPIKA TYAGI
Introduction to Telegram
•The platform offers a range of functionalities beyond traditional
messaging, including group chats, channels, and bot integration,
making it a versatile tool for both personal and professional
communication.
Key Features of Telegram
•Security & Privacy
•Group Chats & Channels
•Bots
•File Sharing
•Customization Options
Entity-Relationship Diagram (ERD) Overview
• Definition of an ER Diagram
• Purpose and benefits in database design
• Brief explanation of entities and relationships
Entities in Telegram’s Data Model
•User : UserID, Username, Full_Name, Profile_Picture, Status, Registration_Date
• Chat : ChatID, Chat_Type, Chat_Name, Creation_Date
•Message : MessageID, ChatID, UserID, Text, File_URL, Timestamp
•File : FileID, File_URL, File_Type, File_Size
•Channel : ChannelID, Channel_Name, Description, Subscribers_Count
•Bot : BotID, Bot_Name, Bot_Functionality, Creation_Date
Relationships Between Entities
User → Message : One-to-Many
Chat → Message : One-to-Many
User → Chat : Many-to-Many (via ChatPartici-
pant)
Channel → Message : One-to-Many
User → Channel : Many-to-Many (via ChannelSubscription)
Message → File : One-to-One
User → Bot : Many-to-Many (via UserBotInterac-
tion)
Entity-Relationship Diagram
Detailed Breakdown of Relationships
•*User sends Message:* One User can send multiple Mes-
sages
•*Chat contains Message:* Each Chat includes multiple Mes-
sages
•*User participates in Chat:* Users can be part of multiple Chats
•*Channel broadcasts Message:* Channels can broadcast multiple
Messages
•*Message includes File:* Each Message can include one File
•*User interacts with Bot:* Users can interact with multiple
Bots
Use Case Examples
•User’s Perspective : How users send messages, inter-
act with channels, and share files
•Channel’s Perspective : How channels broadcast
messages and gain subscribers
•Bot’s Perspective : How bots automate tasks and in-
teract with users
Conclusion
•Telegram’s development from a messaging app to a feature-rich com-
munication platform highlights its ability to address real-world chal-
lenges in digital communication.
THANK YOU & REGARDS