09_DB Schema Release
Introduction
SceneMaker is releasing the data structure it uses to analyze and store broadcast video data. — Must
include a link to the GitHub
DB schema — The storage formats include structured and unstructured data. The databases used in this project are as follows.
| MariaDB (relational) | Milvus (VectorDB) | |
|---|---|---|
| Content | Structured data. AI results in a readable format (subtitles, summaries, people, emotions) | Unstructured data. text’s embedding vectors + metadata for search |
| Role | Original Truth (Single Source of Truth) | Derived Version for Search |
Overall Data Storage Flow
We use MySQL and Milvus as data storage systems, and data is stored according to the flow shown below.

Relational tables are connected via v_id, centered around t_video.
t_video ─┬─ t_dialogue / t_dialogue_refine (Dialogue)
├─ t_segment / t_segment_refine (6-second screen analysis)
├─ t_chapter (Scene/Sub)
├─ t_scene (Scene by Event)
├─ t_category (Category, Self-Referencing Hierarchy)
└─ t_code (status code)
Let’s take a look at the structure of each database.
1. MariaDB Tables

t_video — Video (Central Table)
Contains the metadata and final summary for a single video.
| Column | Type | Description |
|---|---|---|
v_id | mediumint | PK, Video ID |
p_v_id | mediumint | Series relationship (e.g., Season 2 → Season 1 reference) |
cate_id | smallint | FK → t_category |
name | varchar(45) | Video Title |
dir | varchar(200) | Video Storage Location |
summary / summary_stt | text | Full Synopsis / STT Stage Summary |
cast | text | Characters mentioned by STT |
status_code | smallint | FK → t_code, Processing Status |
reg/upd_datetime | datetime | Date and Time of Entry/Update |
t_category — Category (self-referencing hierarchy)
p_cate_id points to the parent category, creating a hierarchy such as "Sports → Baseball."
| Column | Description |
|---|---|
cate_id (PK) / cate_name | Category ID / Name |
p_cate_id | Parent Category |
t_dialogue — Dialogue (Subtitles)
STT results. These are chronological dialogue entries where (v_id, idx) is the PK.
| Column | Type | Description |
|---|---|---|
v_id, idx | PK, Video/Dialogue Order | |
start_time / end_time | time(1) | Speech Interval |
speaker / speaker_name | char(4) / varchar | Speaker label / Corrected real name |
lang | char | Speech language |
dialogue | varchar(500) | Dialogue text |
t_dialogue_refine is a revised version with corrected character names; the schema is nearly identical.
t_segment — 6-second video analysis (search unit)
Results of video analysis divided into 6-second segments. This is the smallest unit for search.
| Column | Type | Description |
|---|---|---|
v_id, seg_id | PK | |
start_time / end_time | time | 6-second interval |
summary | varchar(1024) | Frame content summary |
adv | tinyint | Whether advertisement is included |
meta | JSON | Structural attributes by category (Sports = Score/Inning…) |
status_code / status_reason | Processing Status |
t_segment_refine is a corrected version with the cast · ocr · sound · action (JSON) field added. (agent-vision output)
t_chapter — Scene / Sub (Hierarchical Summary)
level distinguishes between scenes (2) and subs/acts (1), and parent_chap_id links scenes to subs.
| Column | Description |
|---|---|
v_id, chap_id (PK) | |
level | 1=Sub (Act) / 2=Scene |
parent_chap_id | Sub to which the scene belongs |
start/end_time, start/end_seg | Time/Segment Range |
title / summary | Label / Plot (Embedding Target) |
cast / keywords / emotion | Characters / Keywords / Emotions |
meta | Extended JSON |
t_scene — Event-level scene
Event-level data by genre (e.g., sports = home runs, strikeouts, etc.). Contains structural attributes in JSON format for search filters.
| Column | Description |
|---|---|
v_id, scene_id (PK) | |
scene_type / description | Event Type / Description (Embedding Target) |
is_replay / is_ad | Replay/Ad Exclusion Flags |
attributes | JSON (Sports = Pitcher/Batter/Inning/Score…) |
In addition, there are legacy tables such as t_play (baseball-specific, replaced by t_scene) and t_segment_2 (for experimental use).
2. Milvus Collection — sm_1024
A vector collection that embeds search targets (subtitles, screens, scenes, subtitles) from>
relational data. Since this is semantic search, unstructured data was used.
One row = vector + meta copy for search.
| Field | Type | Description |
|---|---|---|
pk | VARCHAR(64) | PK, "v_id:ref_type:ref_id" |
vector | FLOAT_VECTOR(1024) | Embedding vector (unique vector value) |
v_id | INT32 | Video ID (→ RDB) |
ref_type | VARCHAR(16) | segment / scene / chapter / dialogue |
ref_id | INT16 | seg_id / chap_id / idx in RDB |
p_ref_id | INT16 | Parent Scene (Parent Context) |
start/end_sec, start/end_time | INT16 / VARCHAR | Time Range |
cast | VARCHAR(500) | Characters |
text | VARCHAR(2048) | Embedded source text |
dialogue / segment / scene | JSON | Original snapshot |
- Index:
vector→ HNSW / Similarity: COSINE - Dynamic Field (
enable_dynamic_field=True):cate_id, emotion, highlight, events, is_ad
3. Linking the Two Repositories
Each vector in Milvus is linked 1:1 to a relational source row via pk = v_id : ref_type : ref_id.
Milvus "42:segment:120" ←→ RDB t_segment (v_id=42, seg_id=120)
ref_type indicates which table it is, while ref_id points to a part of that table’s primary key (seg_id /chap_id /idx).
4. Storage Order
Data is stacked along the pipeline in the following order: (small atom → derived → vector index)
| Order | Storage | Responsible |
|---|---|---|
| 1 | t_video (shell) | Registration |
| 2 | t_dialogue · t_segment | agent-stt · agent-vision |
| 3 | t_chapter · t_scene | agent-scenario |
| 4 | t_video.summary | agent-scenario |
| 5 | Milvus sm_1024 (vector index) | agent-scenario |
Once all relational storage is complete, the vector indexing is performed last.
Conclusion
The complete DDL and collection definitions are publicly available in the repository. SceneMaker is distributed under the Apache 2.0 license.
This article presents research results conducted with support from the Ministry of Science and ICT and the National IT Industry Promotion Agency under the “2026 Open Source AI and Software Development and Utilization Support Project.”