SQL Alchemy - Basic Declarative DB Models

This reference sheet shows the basic declaration of model classes (here to be used in a SQLite database):

  • Author

  • Book

  • Publisher

  • Book-Publisher (a book may be published at multiple publishers, a publisher may have many books)

  • Author-Publisher (an author may have multiple publishers, a publisher may have many authors)