Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Latest commit

 

History

History
14 lines (8 loc) · 1003 Bytes

subscribe-data-model.md

File metadata and controls

14 lines (8 loc) · 1003 Bytes

subscribe-data-model

This file describes the relational data model that represents the subscribe service entities in the database.


Some design reasons we considered:

  • Since the subscriber e-mail is introduced by the user, we encode it in base64 to prevent SQL Injections. Also, since affected e-mails must exist in the LeaksDB database to trigger a notification, we are storing it's hash version (SHA256), which again prevents SQL injections.
  • We define auto-gen keys as primary keys instead of relying on domain identity keys. This is done to reduce database size, as primary keys are almost longer than 8 bytes, but long integer values are always 8 bytes each.

Note: We refer to generating the next available unique integer as autogen in the data model diagram, for primary key definition. Do not confuse with AUTOINCREMENT keyword from SQLite, we don't use it.

entity relationship model describing subscriber database schema