Skip to content

0018 use relationship table between batch search and project

mvanzalu edited this page May 11, 2022 · 1 revision

18. Use relationship table between Batch Search and Project

Date: 2022-03-25

Status

Accepted

Context

Multi project search has been previously implemented. Consequently, performing batch searches on multiple projects should be possible.

Decision

In terms of data persistance and database we decided to modify the BATCH_SEARCH table by removing the PRJ_ID column. Additionally we will create a relationship table linking user history ids and project ids in order to guarantee an N:M relationship. The new table BATCH_SEARCH_PROJECT will have the following constraints :

  • UNIQUE constraint between the user history id and project id to avoid unnecessary duplicates.
  • FOREIGN KEY on the user history to make sure that existing elements are bound. We will not add a FOREIGN KEY on the project id because we don't store the project ids in the database.

batch_search_project_relationship

Consequences

The backend functions related to database operations will be modified

Datashare

Customize (Legacy)

Translations

This project is currently available in English, French, Spanish and Japanese. You can help us to improve and complete translations on Crowdin.

About ICIJ

Datashare is a project by ICIJ, a collective of investigative journalists.

ICIJ Logo

Clone this wiki locally