Skip to content

Database Description#

Database Structure#

The general scheme of table relations in the CARS_Analytics database (Figure 3).

Database scheme
Figure 3. Database scheme

Database Tables#

content_app_vehiclecolor#

Table 3. Description of table content_app_vehiclecolor

Field Type Description Relations
id uuid Vehicle color ID DB – content_app_platelistitem_color, column – color_id
title varchar Color name -
code varchar Color cide -

content_app_platelistitem_license_plate_features#

This is an intermediate table. It references the tables content_app_platelistitem (column id) and content_app_licenseplatefeaturevalue (column id), establishing a link between records and values of license plate features.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

content_app_licenseplatefeature#

Table 4. Description of table content_app_licenseplatefeature

Field Type Description Relations
id uuid The license plate feature ID DB – content_app_platelistitem_license_plate_features, column – platelistitem_id
score numeric Quality rating value of the license plate feature -
value_id uuid The license plate feature value ID DB - content_app_platelistitem_license_plate_features, column - licenseplatefeaturevalue_id
timestamp timestamptz Time of recognition of the license plate feature -

auth_app_caruser#

Table 5. Description of table auth_app_caruser

Field Type Description
password varchar User's password
last_login timestamptz Date and time of last login
is_superuse bool Indicates if the user is a superuser (full system access)
timestamp timestamptz Time of the last record update
first_name varchar User's first name
last_name varchar User's last name
is_staff bool Indicates if the user is a staff member (access to the admin interface)
is_active bool Indicates if the user is active (can/cannot log in)
date_joined timestamptz User's registration date
id uuid User ID
email varchar Email address (login)
role int4 User's role in the system
name varchar Full or display name of the user

content_app_platelistitem_color#

This is an intermediate table. It references the tables content_app_platelistitem (column id) and content_app_vehiclecolor (column id), establishing a link between license plate records and the corresponding vehicle colors.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

scenario_manager_scenariogroup#

Table 6. Description of table scenario_manager_scenariogroup

Field Type Description Relations
id uuid Scenario ID DB – content_app_event, column – scenario_id
DB – content_app_incident, column – scenario_id
DB – scenario_manager_handler, column – scenario_id
DB – scenario_manager_scenariolistextra, column – scenario_id
title varchar Scenario name -

content_app_camera#

Table 7. Description of table content_app_camera

Field Type Description
id uuid Camera ID
created timestamptz Date and time of camera creation
updated timestamptz Date and time of camera update
car_stream_url varchar Camera URL
name varchar Camera name
input_location varchar RTSP video stream address or video file location
input_type varchar Source type - video file or RTSP
input_protocol varchar Video streaming protocol
roi_x int4 The value of the horizontal coordinate of the the detection area
roi_y int4 The value of the vertical coordinate of the detection area
roi_width int4 Detection area length
roi_height int4 Detection area width
rotation int4 Video stream rotation angle
stream_uuid varchar Video stream ID
watch_url varchar Link to CARS_Stream visual mode
preview_image varchar Image displayed on camera preview
is_active bool Camera activity status
is_enabled bool Camera operation status
is_made_automatically bool Camera creation method - manual or automatic
status int4 Video stream status
address varchar Physical address of the camera location
lat float8 Camera geolocation latitude
lon float8 Camera location longitude
extra_data jsonb Field for additional information
is_restart_auto bool Camera auto restart status
parameters jsonb Camera parameters (e.g. detector size, thresholds, FGS usage, etc.)
password varchar Password for accessing the ANPR camera
user_name varchar Username for accessing the ANPR camera

content_app_event_license_plates#

This is an intermediate table. It references the tables content_app_event (column id) and content_app_licenseplate (column id), establishing a link between event records and the corresponding license plates.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

content_app_carbrand#

Table 8. Description of table content_app_carbrand

Field Type Description Relations
id uuid Vehicle brand ID DB – content_app_carmodel, column – brand_id
DB – content_app_platelistitem_car_brands, column – carbrand_id
title varchar Vehicle brand name -

content_app_vehicletype#

Table 9. Description of table content_app_vehicletype

Field Type Description Relations
id uuid Vehicle type ID DB – content_app_event, column– vehicle_type_id
DB – content_app_incident, column – vehicle_emergency_type_id
DB – content_app_platelistitem, column – list_id
titile varchar Vehicle type name -

content_app_specialtransporttype#

Table 10. Description of table content_app_specialtransporttype

Field Type Description Relations
id uuid Special transport type ID DB - content_app_event, column - special_transport_type_id
DB – content_app_incident, column - special_transport_type_id
DB – content_app_platelistitem, column – list_id
title varchar Special transport name -
code varchar Special transport code -

content_app_carmodel#

Table 11. Description of table content_app_carmodel

Field Type Description Relations
id uuid Vehicle model ID DB – content_app_event, column – car_model_id
DB – content_app_incident, column – car_model_id
DB – content_app_platelistitem_car_models, column – car_model_id
title varchar Vehicle model name -
brand_id uuid Vehicle brand ID DB – content_app_carbrand, column – id

content_app_license_plate_feature_value#

Table 12. Description of table content_app_license_plate_feature_value

Field Type Description Relations
id uuid License plate feature value ID DB – content_app_licenseplatefeature, column – value_id
DB – content_app_platelistitem_license_plate_feature, column – licenseplatefeaturevalue_id
type varchar License plate feature type -
code varchar License plate feature code -
title varchar License plate feature name -

auth_app_caruser_groups#

This is an intermediate table. It references the tables auth_app_caruser (column id) and auth_group_permissions (column permission_id), establishing a link between users and their groups.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

content_app_camerastatushistory#

Table 13. Description of table content_app_camerastatushistory

Field Type Description Relations
id int4 Record ID for the status history
timestamp timestamptz Time of status change for the camera -
status int4 Camera status -
camera_id uuid Camera ID associated with the record DB - content_app_camera, column - id

content_app_platelistitem_vehicle_emergency_types#

This is an intermediate table. It references the tables content_app_platelistitem (column id) and content_app_vehicleemergencytype (column id), establishing a link between license plates and emergency services.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

content_app_incident_colors#

This is an intermediate table. It references the tables content_app_incident (column id) and content_app_vehiclecolorestimation (column id), establishing a link between incidents and vehicle color estimations.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

scenario_manager_handler#

Table 14. Description of table scenario_manager_handler

Field Type Description Relations
id uuid Handler ID -
dt_created timestamp Date and time of handler creation -
handler_type varchar Handler type -
comment varchar Handler comment -
is_enabled bool Handler activity status -
parameters jsonb Handler parameters -
camera_id uuid Camera ID DB – content_app_camera, column – id
scenario_id uuid Scenario ID DB – scenario_manager_scenario, column – id
command text Command name -

auth_group_permissions#

This is an intermediate table. It references the tables auth_group (column id) and auth_permission (column id), establishing a link between groups and their permissions.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

auth_app_caruser_user_permissions#

This is an intermediate table. It references the tables auth_app_caruser (column id) and auth_permission (column id), establishing a link between users and their access rights.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

auth_group#

Table 15. Description of table auth_group

Field Type Description
id int4 Access rights group identifier
name varchar Access rights group name

scenario_manager_indicatortype#

Table 16. Description of table scenario_manager_indicatortype

Field Type Description Relations
id uuid Scenario ID -
title varchar Scenario name -
code varchar Scenario code -
for_type varchar Scenario type -

django_content_type#

Table 17. Description of table django_content_type

Field Type Description
id int4 Content type record identifier
app_label varchar Name of the application to which the model belongs (e.g., «content_app», «scenario_manager»)
model varchar Name of the model in the application (e.g., «vehicletype», «indicatortype»)

content_app_list#

Table 18. Description of table content_app_list

Field Type Description
id uuid List ID
name varchar List name
create timestamptz Date of list creation
extra jsonb Field for additional information

content_app_platelistitem_car_models#

This is an intermediate table. It references the tables content_app_platelistitem (column id) and content_app_carmodel (column id), establishing a link between license plates and the corresponding vehicle models.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

content_app_vehiclecolorestimation#

Table 19. Description of table content_app_vehiclecolorestimation

Field Type Description Relations
id int4 ID of the color estimation record
score numeric Color recognition score of the vehicle -
color_id uuid ИVehicle color ID DB - content_app_vehiclecolor, сolumn - id
timestamp timestamptz Time of the last record update -

auth_app_caruseradministration#

Table 20. Description of table auth_app_caruseradministration

Field Type Description Relations
id uuid User's ID -
email varchar User's email address (login)
role int4 User's role in the system DB – content_app_caruser, column – role
name varchar User's full or display name
timestamp timestamptz Time of the last record update -
is_registered bool User's registration status (registered or not) -
is_activated bool User's activation status (activated or not) -
is_read bool User's status on reading certain information -

content_app_event_groups#

This is an intermediate table. It references the tables content_app_event (column id) and content_app_fragmentsgroup (column id), establishing a link between events and the fragments related to those events.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

task_manager_task#

Table 21. Description of table task_manager_task

Field Type Description Relations
id uuid Task ID -
created timestamptz Date and time of task creation -
finished timestamptz Date and time of task completion -
export_file varchar Path to the file associated with the task -
type varchar Task type -
sender varchar Task sender -
status int4 Task status -
running_progress numeric Current progress of the task -
updated timestamptz Date and time of the last task update -
extra_info varchar Additional information about the task -
creator_id uuid ID of the user who created the task DB – auth_app_caruser, column – id

content_app_fragmentsgroup#

Table 22. Description of table content_app_fragmentsgroup

Field Type Description Relations
id uuid ID of the full frame group DB – content_app_event_groups, column – fragmentsgroup_id
DB – content_app_incident_groups, column – fragmentsgroup_id
created timestamptz Date and time the event was created -
object_type varchar Type of object -

content_app_incident_groups#

This is an intermediate table. It references the tables content_app_incident (column id) and content_app_fragmentsgroup (column id), establishing a link between incidents and data fragments.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

content_app_incident#

Table 23. Description of table content_app_incident

Field Type Description Relations
id uuid Incident ID -
timestamp timestamptz Date and time of the incident creation -
track_id varchar Track ID -
frame_id varchar Frame ID for the incident -
object_type varchar Type of the incident -
detections jsonb Information about object detection -
comment text Comment for the incident -
bestshot varchar Best shot ID -
car_model_score numeric Vehicle model score quality -
car_brand_score numeric Vehicle brand score quality -
vehicle_type_score numeric Vehicle type score quality -
vehicle_type_emergency_score numeric Emergency vehicle type score quality -
vehicle_descriptor text Vehicle descriptor -
is_unread bool Incident status: new or viewed -
camera_id uuid Camera ID DB – content_app_camera, column – id
car_model_id uuid Vehicle model ID DB – content_app_carmodel, column – id
scenario_id uuid Scenario ID DB – scenario_manager_scenario, column – id
vehicle_emergency_type_id uuid Emergency vehicle type ID DB – content_app_vehicleemergencytype, column – id
vehicle_type_id uuid Vehicle type ID DB – content_app_vehicletype, column – id
service_data jsonb Service data for the incident -
stream_id uuid Stream identifier -
stream_track_id int4 Track identifier in the stream -
public_transport_type_id uuid Public transport type ID DB - content_app_publictransporttype, column - id
public_transport_type_score numeric Public transport type score quality -
special_transport_type_id uuid Special transport type identifier DB - content_app_specialtransporttype, column – id
special_transport_type_score numeric Special transport type score quality -
vehicle_axles_amount int4 Number of vehicle axles -
vehicle_axles_amount_score numeric Axle count score quality -
patched_with_track_end boolean Flag indicating whether the track end event for this incident was received from CARS_Stream -
quantity int4 Number of vehicles -
direction varchar Vehicle direction -
exit_timestamp timestamptz Time when the vehicle exited -
atomic_id int8 uuid -
color_type_score numeric Vehicle color score quality -
color_type_id uuid Vehicle color type ID -
vehicle_emergency_has_flashing_light bool Indicates whether the vehicle has flashing lights
vehicle_emergency_has_flashing_light_score numeric Flashing light score quality -
vehicle_orientation varchar Vehicle orientation -
vehicle_orientation_score numeric Vehicle orientation score quality -
count_diff int4 Vehicle counter -

content_app_event_colors#

This is an intermediate table. It references the tables content_app_event (column id) and content_app_vehiclecolorestimation (column id), establishing a link between events and vehicle color estimations.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

djando_admin_log#

Table 24. Description of table djando_admin_log

Field Type Description Relations
id int4 Log record ID -
action_tim timestamptz Time of the action performed -
object_id text ID of the object the action was performed on -
object_repr varchar Object name the action was performed on -
action_flag int2 Flag indicating what action was performed -
change_me text Text description of the changes made to the object -
content_ty int4 Content type ID -
user_id uuid User ID who performed the action DB – auth_app_caruser, column – id

content_app_platelistitem_vehicle_types#

This is an intermediate table. It references the tables content_app_platelistitem (column id) and content_app_vehicletype (column id), establishing a link between list items and vehicle types.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

content_app_platelistitem_car_brands#

This is an intermediate table. It references the tables content_app_platelistitem (column id) and content_app_carbrand (column id), establishing a link between list items and vehicle brands.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

content_app_publictransporttype#

Table 25. Description of table content_app_publictransporttype

Field Type Description Relations
id uuid Public transport type ID DB - content_app_event, column - public_transport_type_id
DB - content_app_incident, column - public_transport_type_id
DB – content_app_platelistitem, column – list_id
title varchar Public transport name -
code varchar Public transport code -

content_app_licenseplate_features#

This is an intermediate table. It references the tables content_app_licenseplate (column id) and content_app_licenseplatefeature (column id), establishing a link between license plates and their features.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

activity_log_app_activitylog#

Table 26. Description of table activity_log_app_activitylog

Field Type Description Relations
id int8 Log record ID -
action varchar Action type -
timestamp timestamptz Date and time when the action was performed -
status varchar Status of the action -
data jsonb Modified data -
target_id uuid ID of the object the action was performed on -
target_title varchar Title of the object the action was performed on -
content_type_id int4 Type of the object -
user_id uuid ID of the user who performed the action DB – auth_app_caruser, column – id

content_app_fragmentsitem#

Table 27. Description of table content_app_fragmentsitem

Field Type Description Relations
id uuid Full frame ID -
timestamp timestamptz Date and time when the incident record was created -
object_type varchar Type of the object detected in the fragment -
file_name varchar Name of the saved frame -
detections jsonb Detection data -
group_id uuid ID of the fragment group this fragment belongs to DB – content_app_fragmentsgroup, column – id
frame_id int4 ID of the frame this fragment belongs to -

scenario_manager_scenario#

Table 28. Description of table scenario_manager_scenario

Field Type Description Relations
id uuid Scenario ID -
dt_created timestamptz Date and time when the scenario was created -
title varchar Scenario title -
scenario_type varchar Scenario type -
is_enable bool Status of the scenario -
indicator_type_id uuid ID of the scenario type DB – scenario_manager_indicatortype, column – id
back_cam_position varchar Position of the back camera -

content_app_incident_license_plates#

This is an intermediate table. It references the tables content_app_incident (column id) and content_app_licenseplatefeature (column id), establishing a link between incidents and license plate features.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

content_app_vehicleemergencytype#

Table 29. Description of table content_app_vehicleemergencytype

Field Type Description Relations
id uuid Emergency service ID DB – content_app_event, column – vehicle_emergency_type_id
DB – content_app_incident, column – vehicle_emergency_type_id
title varchar Name of the emergency service -
code varchar Code of the emergency service -

content_app_event#

Table 30. Description of table content_app_event

Field Type Description Relations
id uuid Event ID -
timestamp timestamptz Date and time of the event creation -
track_id varchar Track ID -
frame_id varchar Frame ID for the event -
object_type varchar Type of the event -
detections jsonb Object detection information -
comment text Event comment -
bestshot varchar Best shot ID -
car_model_score numeric Vehicle model score quality -
car_brand_score numeric Vehicle brand score quality -
vehicle_type_score numeric Vehicle type score quality -
vehicle_type_emergency_score numeric Emergency vehicle type score quality -
vehicle_descriptor text Vehicle descriptor -
camera_id uuid Camera ID DB – content_app_camera, column – id
car_model_id uuid Vehicle model ID DB – content_app_carmodel, column – id
scenario_id uuid Scenario ID DB – scenario_manager_scenario, column – id
vehicle_emergency_type_id uuid Emergency vehicle type ID DB – content_app_vehicleemergencytype, column – id
vehicle_type_id uuid Vehicle type ID DB – content_app_vehicletype, column – id
service_data jsonb Service data for the event -
stream_id uuid Stream identifier -
stream_track_id int4 Track identifier in the stream -
public_transport_type_id uuid Public transport type ID DB - content_app_publictransporttype, column - id
public_transport_type_score numeric Public transport type score quality -
special_transport_type_id uuid Special transport type identifier DB - content_app_specialtransporttype, column – id
special_transport_type_score numeric Special transport type score quality -
vehicle_axles_amount int4 Number of vehicle axles -
vehicle_axles_amount_score numeric Axle count score quality -
patched_with_track_end boolean Flag indicating whether the track end event was received from CARS_Stream -
quantity int4 Number of vehicles -
direction varchar Vehicle direction -
exit_timestamp timestamptz Time when the vehicle exited -
atomic_id int8 uuid -
color_type_score numeric Vehicle color score quality -
color_type_id uuid Vehicle color type ID -
vehicle_emergency_has_flashing_light bool Indicates whether the vehicle has flashing lights
vehicle_emergency_has_flashing_light_score numeric Flashing light score quality -
vehicle_orientation varchar Vehicle orientation -
vehicle_orientation_score numeric Vehicle orientation score quality -
count_diff int4 Vehicle counter -

content_app_platelistitem_countries#

This is an intermediate table. It references the tables content_app_platelistitem (column id) and content_app_licenseplatecountry (column id), establishing a link between license plates and the countries where they are registered.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

djando_session#

Table 31. Description of table djando_session

Field Type Description
session_key varchar Unique session key used to identify the user's session in the system
session_data text Session data, including information about the user's current state in the system
expire_data timestamptz Date and time when the session expires

content_app_vehiclecolortype#

Table 32. Description of table content_app_vehiclecolortype

Field Type Description Relations
id uuid Vehicle color type ID DB – content_app_event, column – color_type_id
DB – content_app_incident, column – color_type_id
title varchar Name of the color type -
code varchar Color type code -

content_app_event_avg_speed#

Table 33. Description of table content_app_event_avg_speed

Field Type Description Relations
id uuid Event ID for speed calculation -
created timestamptz Date and time of event creation -
group uuid Group ID in which the event was created DB – content_app_event_groups, column – id
speed int4 Speed value of the vehicle -
distance_to_previous numeric Distance between the start and end points -
handler_id uuid Handler ID used for speed calculation DB – scenario_manager_handler, column – id
record_id uuid Record ID to which the event belongs DB – content_app_event, column – id

scenario_manager_scenariogroup_scenarios#

This is an intermediate table. It references the tables scenario_manager_scenariogroup (column id) and scenario_manager_scenario (column id), establishing a link between scenario groups and specific scenarios.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.

content_app_incident_avg_speed#

Table 34. Description of table content_app_incident_avg_speed

Field Type Description Relations
id uuid Incident ID for speed calculation -
created timestamptz Date and time of incident creation -
group uuid Group ID in which the incident was created -
speed int4 Speed value of the vehicle -
distance_to_previous numeric Distance between the start and end points -
handler_id uuid Handler ID used for speed calculation DB – scenario_manager_handler, column – id
record_id uuid Record ID to which the incident belongs DB – content_app_incident, column – id

content_app_licenseplatecountry#

Table 35. Description of table content_app_licenseplatecountry

Field Type Description
id uuid Country ID for the license plate
titile varchar Country name
code varchar Country code

auth_permission#

Table 36. Description of table auth_permission

Field Type Description
id int4 Permission ID
name varchar Permission name
content_t int4 Content type ID associated with the permission
codename varchar Codename for the permission, used in the system for easier reference

scenario_manager_scenariolistextra#

Table 37. Description of table scenario_manager_scenariolistextra

Field Type Description Relations
id uuid ID for the record
dt_created timestamptz Date and time when the list was created -
is_except varchar Indicates whether the list belongs to a scenario -
list_id uuid List ID DB – content_app_list, column – id
scenario_id uuid Scenario ID DB – scenario_manager_scenario, column – id

content_app_cameraregion#

Table 38. Description of table camera_app_cameraregion

Field Type Description
id uuid Recognition zone ID
tag_name varchar Name of the recognition zone

content_app_platelistitem#

Table 39. Description of table content_app_platelistitem

Field Type Description
id uuid License plate ID
created timestamptz Time of the vehicle detection event
car_grz varchar License plate symbols
image_item varchar Image of the license plate
image_accuracy float8 Accuracy score for license plate recognition
image_descriptor text License plate descriptor
extra_data jsonb Field for additional information
list_id uuid List ID
vehicle_emergency_has_flashing_light bool НPresence of flashing lights

content_app_cameravector#

Table 40. Description of table content_app_cameravector

Field Type Description Relations
id uuid Vehicle vector ID -
name varchar Vector name -
max_angle_d int4 Maximum angle of the vector in degrees -
points jsonb Array of points defining the vector coordinates -
camera_id uuid Camera ID associated with the vector DB – content_app_camera, column – id
display_color varchar Color used for displaying the vector in the interface -

content_app_licenseplate#

This is an intermediate table. It references the tables content_app_incident (column id) and content_app_licenseplatefeature (column id), establishing a link between incidents and license plate features.

This is a many-to-many relationship, which means that one record in a table can be linked to several records, and similarly, one record in another table can be linked to multiple records in the first table.