YouTube video platform database schema

How a video platform models its data: channels and uploads, encoded renditions, view counts rolled up per day, likes, one-level comment threads, subscriptions, playlists, monetisation and community posts.

Youtube ER diagram

YouTube video platform database schema n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 11 n1 n1 users idBIGINT emailVARCHAR display_nameVARCHAR country_codeCHAR is_suspendedBOOLEAN created_atTIMESTAMPTZ channels idBIGINT owner_idBIGINT handleVARCHAR nameVARCHAR descriptionTEXT subscriber_countINTEGER monetization_stat…VARCHAR payout_currencyCHAR created_atTIMESTAMPTZ videos idBIGINT channel_idBIGINT titleVARCHAR descriptionTEXT visibilityVARCHAR statusVARCHAR duration_secondsINTEGER published_atTIMESTAMPTZ view_countBIGINT like_countINTEGER comment_countINTEGER is_made_for_kidsBOOLEAN created_atTIMESTAMPTZ video_renditions idBIGINT video_idBIGINT labelVARCHAR codecVARCHAR widthSMALLINT heightSMALLINT bitrate_kbpsINTEGER storage_keyVARCHAR statusVARCHAR video_view_daily video_idBIGINT view_dateDATE viewsBIGINT unique_viewersBIGINT watch_time_secondsBIGINT average_view_ratioREAL reactions video_idBIGINT user_idBIGINT valueSMALLINT reacted_atTIMESTAMPTZ comments idBIGINT video_idBIGINT author_channel_idBIGINT parent_idBIGINT bodyTEXT like_countINTEGER reply_countINTEGER is_heldBOOLEAN created_atTIMESTAMPTZ subscriptions subscriber_idBIGINT channel_idBIGINT notifyVARCHAR subscribed_atTIMESTAMPTZ playlists idBIGINT owner_channel_idBIGINT titleVARCHAR descriptionTEXT visibilityVARCHAR system_kindVARCHAR video_countINTEGER created_atTIMESTAMPTZ playlist_items idBIGINT playlist_idBIGINT video_idBIGINT positionINTEGER added_atTIMESTAMPTZ video_monetization video_idBIGINT is_monetizedBOOLEAN ad_stateVARCHAR ad_formatsVARCHAR self_certifiedBOOLEAN claim_stateVARCHAR reviewed_atTIMESTAMPTZ community_posts idBIGINT channel_idBIGINT bodyTEXT attached_video_idBIGINT poll_optionsJSON like_countINTEGER visibilityVARCHAR created_atTIMESTAMPTZ

Related database schemas