Skip to content

Project Structure

Timothy Miller edited this page Nov 8, 2018 · 1 revision

Project Structure

Database Structures

There will be tow main databases. A PostGres Database will be custom created and managed by Spark. It will contain user and book activity information. A second database will be created through the Third Party Application, Calibre. It will contain information about book characteristics.

Terms

  • Calibre Database: The Database built by a 3rd party in order to look up and store information about a book's characteristics, such as Title and Date Published.
  • Postgres Database: The Database built
  • Postgres-Library: Table Stored in PostGres-Database and managed by Spark. It contains information about a book's activity, such as to whom it is checked out and when it is due to be returned.
  • PostGres-Users: Table stored in Postgres-Database and managed by by Spark. It contains all of the information pertinent to users

Tables

  1. Postgres-Users
    • Name: user
Field Name Type
id Integer
first_name String
last_name String
  1. Postgres-Libary
    • Name: book
  2. Calibre-Library
    • Name: library (named when created the API instance library = self.gui.current_db.new_api)

Management

  • SQLAlchemy will interface with Postgres-Database
  • The Calibre Library API will interface with the Calibre-Database
  • The Postgres-Library will be synced to follow the Calibre-Library.
  • The Calibre-Library will need to check with the Postgres-Library before it deletes a book that is checked out by a user.
  • The Postgres-Library books will have a Many-to-One relationaship with the Postgres-Users users. i.e) One User can check out multiple books.

Clone this wiki locally