Skip to content

YouTube IDs

Every YouTube video ID that the library holds, once.

This page is the dictionary for the table. It holds the definition and purpose of every field, and it is where a field is changed.

Fields

Field Key Type Required Allowed values or link Definition Purpose Notes
YouTube_Video_ID YOUTUBE_IDS.YOUTUBE_VIDEO_ID Text Yes The 11-character YouTube video ID. Keeps a video and an MTV piece from ever holding the same ID.
Item_Kind YOUTUBE_IDS.ITEM_KIND One value from a list Yes Video, MTV Whether the ID belongs to a video of a song or to an MTV piece. Says which table holds the row for the ID.

Constraints

What the database enforces on each field, beyond its type. A field that is not listed has no default, no uniqueness, no range and no reference. Every field marked Required is NOT NULL.

Field Default Unique Range or pattern Refers to
YouTube_Video_ID Yes exactly 11 letters, digits, - or _ (V-05)
Item_Kind ref_YouTube_Item_Kinds

Rules across fields:

  • core_Videos and core_MTV each have a generated constant column, YouTube_Item_Kind (Video in one, MTV in the other), and a composite foreign key from YouTube_Video_ID and YouTube_Item_Kind to this table. An ID of one kind therefore cannot be held by the other, and an ID can be held only once.

The table is core_YouTube_IDs. Every link refuses a missing target and refuses the deletion of a row that another row still points to.

Choice values

Item_Kind

Value Meaning Purpose
Video The ID belongs to a row of core_Videos.
MTV The ID belongs to a row of core_MTV.