device_match


Description

This table contains final profiling results for a device. It is parent table that is partitioned over zone schema. Example: Device profiles for all devices for zone id 2 will reside in zone_0002.device_match. This is the table that gets used to display profile information for a device. It contains a record for each of the profile type (Device Type, OS, Model, Version, Vendor) that contains a match. So, one device can have at most 5 records in this table if there is a match for all 5 profile types. Entries to this table will get added/updated/deleted as part of any profile response processing as well as when a new pattern file is imported into database.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
zone_id int4 10 null
zone.id fk_device_match_zone R

Zone Id of a device_match record. zone.device_match table is a parent table for all partitioned (by zone_id) zone_xxx.device_match tables. It maps to zone.id column

device_id int4 10 null
device.id fk_device_match_device C

Id of a device this attribute belongs to. It maps to device.id

pattern_id int4 10 null

Id of pattern that contains a match for given profile type record. It maps to profile.pattern.id

type_id int4 10 null
type.id fk_device_match_type R

Id of a profile type for given match record. It maps to profile.type. Valid values for profile.type are Device Type, OS, Model, Version, Vendor

attribute_id int4 10 null
attribute.id fk_device_match_attribute R

Id of an attribute/value for given match record. It maps to profile.attribute. All values for profile.attribute comes from pattern->attribute value of patterns.xml

confidence int4 10 null

Confidence for any given match record. It is derived from profile.pattern_attribute for matching pattern_id and type_id. It is stored in device_match to make fetching profile information avoiding lookup against pattern_attribute.

Table contained 0 rows

Indexes

Constraint Name Type Sort Column(s)
pk_device_match Primary key Asc/Asc device_id + type_id
idx_device_match_attribute_id Performance Asc attribute_id
idx_device_match_device_id Performance Asc device_id
idx_device_match_type_id Performance Asc type_id

Relationships