Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 2.6 KB

README.md

File metadata and controls

66 lines (52 loc) · 2.6 KB

Uranus Database

This database is responsible for storing all the information that is generated by the uranus crawlers and workers ecosystem, in an organized and easily accessible way.


Database Diagram


Data Catalog

Table: COMPANY

COLUMN TYPE DESCRIPTION
ID INT - NOT NULL - AUTO INCREMENT Unique identifier of each company within the platform
NAME VARCHAR - NOT NULL Company Name
PHONE INT - DEFAULT NULL Company manager's phone number
MANAGER STRING - DEFAULT NULL Name of the Manager/Company contact point
STATUS INT - NOT NULL Flag that references whether the company is active (1) or not (0)

Table: RULE

COLUMN TYPE DESCRIPTION
ID INT - NOT NULL - AUTO INCREMENT Unique identifier for each rule
ID_COMPANY INT - NOT NULL - FK Identifier that relates rule and company
STRING VARCHAR - NOT NULL Value to be sought by crawlers
SOURCE VARCHAR - NOT NULL Channel to be monitored
FILTER LONGTEXT - NOT NULL Type of filter to be applied
SCORE INT - NOT NULL Value regarding the criticality of the rule
DESCRIPTION VARCHER - NOT NULL Reserved area to describe the objective to be achieved with the rule
STATUS INT - NOT NULL Flag that references whether the rule is active (1) or not (0)

Table: ALERT

COLUMN TYPE DESCRIPTION
ID INT - NOT NULL - AUTO INCREMENT Unique identifier for each alert
ID_COMPANY INT - NOT NULL - FK Identifier that links the history of the alert with the company
DATETIME DATE TIME - NOT NULL Date and time the alert was inserted into the database
STATUS INT - NOT NULL Flag that references whether the alert is active (1) or not (0)
NOTIFICATION INT - NOT NULL Flag that references whether the notification was sent (1) or not (0)
CONTENT LONGTEXT - NOT NULL Content/evidence captured by the crawler
HASH CHAR(32) - NOT NULL Unique hash that references the alert

Table: HISTORY

COLUMN TYPE DESCRIPTION
ID INT - NOT NULL - AUTO INCREMENT Unique identifier for each activity in the history
ID_COMPANY INT - NOT NULL - FK Identifier that links event history with the company
ENGINE VARCHAR - NOT NULL Engine that ran
DATETIME DATE TIME - NOT NULL Date and time the activity was performed
RULE_QTT INT - NOT NULL Number of rules executed
EVENT_QTT INT - NOT NULL Number of events generated

Setup

    $ docker build --rm --squash -t uranus-database .
    $ docker run -d -p 3306:3306 --name database -e MARIADB_ROOT_PASSWORD=PasswordHere uranus-database