Schema reference

Declared schema · schema.sql · not a live database
4
tables
11
columns
3
references
0
enums

Diagram

authorstagsbooksbook_tags
Left to right by dependency: a table sits right of everything it references, so this order is one the tables can be created in.

Tables

authors

ColumnTypeNullKeyDefaultReferencesComment
idINTEGERprimary
nameVARCHAR(120)

book_tags

ColumnTypeNullKeyDefaultReferencesComment
idINTEGERprimary
book_idINTEGER→ books(id)
tag_idINTEGER→ tags(id)

books

ColumnTypeNullKeyDefaultReferencesComment
idINTEGERprimary
author_idINTEGER→ authors(id)
titleVARCHAR(240)
summaryTEXTnull

tags

ColumnTypeNullKeyDefaultReferencesComment
idINTEGERprimary
nameVARCHAR(80)