Skip to content
Snippets Groups Projects
Select Git revision
  • 7f5c4266ca8c9d2d54d0afb2a99876cada43bf2b
  • main default
2 results

gitlab-profile

  • Clone with SSH
  • Clone with HTTPS
  • Name Last commit Last update
    README.md

    The project

    Database schema

    ---
    title: Biblio4 Schema
    ---
    erDiagram
        USER ||--o{ COLLECTION : owns
        USER {
            string username PK
            string password
        }
        COLLECTION }o--o{ PHYSICAL_BOOK : are_composed_of
        COLLECTION {
            uuid id PK
            string name
            string user_id FK
        }
        USER ||--o{ SHARE_KEY : has
        COLLECTION ||--o{ SHARE_KEY : has
        SHARE_KEY {
            uuid id PK
            uuid user_id PK, FK
            uuid[] collection_ids FK
            string key_value
            datetime expiration_date
            enum permission_type
        }
        USER ||--o{ REVIEW : writes
        BOOK ||--o{ REVIEW : has_reviews
        REVIEW {
            uuid id PK
            string book_isbn FK
            string username FK
            bool read
            int rating
            string notes
            string tags
        }
        PHYSICAL_BOOK }o--|| BOOK : is_a
        PHYSICAL_BOOK {
            uuid id PK
            string isbn FK
            uuid user_id FK
            string storage_location
        }
        PHYSICAL_BOOK ||--o{ COLLECTION : belongs_to
        BOOK {
            string isbn PK
            string title
            string author
            string description
            string publish_date
            string image_url
            int average_rating
        }