media-collection-crud/design/db.gv

74 lines
2.2 KiB
Plaintext
Raw Normal View History

digraph {
graph [pad="0.5", nodesep="0.5", ranksep="2"];
node [shape=plain]
rankdir=RL;
media [label=<
<table border="0" cellborder="1" cellspacing="0">
<tr><td><b>media</b></td></tr>
<tr><td port="id">id</td></tr>
<tr><td port="media_type_id">media_type_id</td></tr>
<tr><td port="display_name">display_name</td></tr>
<tr><td port="notes">notes</td></tr>
</table>
>];
media_name [label=<
<table border="0" cellborder="1" cellspacing="0">
<tr><td><b>media_name</b></td></tr>
<tr><td port="id">id</td></tr>
<tr><td port="media_id">media_id</td></tr>
<tr><td port="name">name</td></tr>
<tr><td pport="language">language</td></tr>
</table>
>];
# CD, DVD, etc.
media_format [label=<
<table border="0" cellborder="1" cellspacing="0">
<tr><td><b>media_format</b></td></tr>
<tr><td port="id">id</td></tr>
<tr><td port="physical">is_physical</td></tr>
<tr><td port="format_name">format_name</td></tr>
<tr><td port="description">description</td></tr>
</table>
>];
media_format_link [label=<
<table border="0" cellborder="1" cellspacing="0">
<tr><td><b>media_format_link</b></td></tr>
<tr><td port="media_id">media_type_id</td></tr>
<tr><td port="media_format_id">media_format_id</td></tr>
</table>
>]
# Video Game, Anime, Movie, TV Show
media_type [label=<
<table border="0" cellborder="1" cellspacing="0">
<tr><td><b>media_type</b></td></tr>
<tr><td port="id">id</td></tr>
<tr><td port="type_name">type_name</td></tr>
<tr><td port="description">description</td></tr>
</table>
>];
media_type_format_link [label=<
<table border="0" cellborder="1" cellspacing="0">
<tr><td><b>media_type_format_link</b></td></tr>
<tr><td port="media_type_id">media_type_id</td></tr>
<tr><td port="media_format_id">media_format_id</td></tr>
</table>
>]
media_type_format_link:media_type_id -> media_type:id
media_type_format_link:media_format_id -> media_format:id
media:media_type_id -> media_type:id
media_name:media_id -> media:id
media_format_link:media_id -> media:id
media_format_link:media_format_id -> media_format:id
}