Skip to content

DB entities

Davide Zanella edited this page Jun 2, 2019 · 4 revisions

The servant DB entities

block_type

In this table are stored all the possible blocks that a user can add in a workflow. Per each record in the data field are specified all the characteristics and parameters that it accepts and needs.

refs: How to add a new block

cache

This table is used to store all the results of the executions of the blocks, so when a block has finished its execution the result is stored here. In case of a block with the property toCache set to true automatically the system try to retrieve a result from a previous execution of that block in the same workflow but in a previous run. Each cache item is related to a workflow's run.

item

Each record of this table is a task of a crowdsourcing site. It could be a task which needs to be judged by a worker or a gold item. Each item is related to a project.

The gold items are set in the figure-eight standard, so with _GOLD at the end of the property name.

project

In this table are stored projects. A project is set of workflows and items, it allows to easily group this resources.

project_collaborations

This table allows users who are not owners of a project to access it. So a user can access a project only if he is the owner or if his id is in this table related to the id of the project.

run

A run is an execution of a workflow so in this table you can see the state of an execution retrieving the right run associated with the project by foreign key.

refs: The execution of a workflow

template_do

In this table are stored some templates useful when doing some standard operations, like image classification, without recreating it by scratch.

users

In this table are present all the users authenticated using Google, the primary key is the Google user id.

Are even stored primary info about the user, like name, surname, email and picture.

refs: Authentication

workers_of_workflow

This table is used for the Blocking user functionality, so block users that want to submit more than one job in the same workflow. When a user opens a new job the crowdsourcing site make an ajax request to servant sending the id of the job and the id of the user. If the user is not present in this table associated with the same workflow and context he can continue doing and submitting the job otherwise an error message is showed to the user and he cannot submit the job.

refs: Blocking user functionality

workflow

A workflow is a graph composed by blocks that have to be executed following an order. In this table are stored workflows and they are related with a project.