Blog
authors, posts, comments and tags. 5 tables, 17 columns, no data.
The map
Each line runs from a linking column (N) to the key it points at (1). The same tables are listed below as text.
The tables
authors
idbigintPKnamevarchar(200) requiredbiotext
posts
idbigintPKauthor_idbigint→ authors requiredtitlevarchar(300) requiredbodytextpublished_attimestamptz
comments
idbigintPKpost_idbigint→ posts requiredauthor_idbigint→ authorsbodytext requiredcreated_attimestamptz required
tags
idbigintPKlabelvarchar(60) required
post_tags
post_idbigint→ posts requiredtag_idbigint→ tags required
What you could look at in SSDO
- Ask how comments connect to authors.
- post_tags is a link table with a two-column key.
- Compare: load this sample, then Duplicate it in the Designer, add a column, save, and compare the two versions.
Create a free workspace and open this sample All samples
PK is a primary key. “→ table” is a link (a foreign key) to that table. This page is a description of a structure we wrote; it holds no rows.