Assuming, there are permament tables on a DB, you can turn these into a dm object. The key constraints are also learned from the DB and taken into account.

So far this only works for MSSQL and Postgres. Also, you can not specify a schema to learn from.

cdm_learn_from_db(dest)

## Arguments

dest A src-object on a DB or a connection to a DB.

## Value

A dm object with the tables from the DB and the respective key relations.

Other DB interaction functions: cdm_copy_to