This function returns a tibble with information about
which key constraints are met (
is_key = TRUE) or violated (
The printing for this object is special, use
to print as a regular tibble.
A tibble with the following columns:
the table in the
"PK" or "FK",
the table columns that define the key,
for foreign keys, the referenced table,
is_key = FALSE, the reason for that.
For the primary key constraints, it is tested if the values in the respective columns are all unique. For the foreign key constraints, the tests check if for each foreign key constraint, the values of the foreign key column form a subset of the values of the referenced column.
dm_nycflights13() %>% dm_examine_constraints()#>#> ● Table `flights`: foreign key tailnum into table `planes`: 1640 entries (14.6%) of `flights$tailnum` not in `planes$tailnum`: N722MQ (27), N725MQ (20), N520MQ (19), N723MQ (19), N508MQ (16), …