diff --git a/vignettes/howto-dm-db.Rmd b/vignettes/howto-dm-db.Rmd index 1328760c3..07e0e018f 100644 --- a/vignettes/howto-dm-db.Rmd +++ b/vignettes/howto-dm-db.Rmd @@ -22,12 +22,11 @@ source("setup/setup.R") To this end, a dm object can be created from any database that has a {[DBI](https://dbi.r-dbi.org/)} backend available ([see list](https://github.com/r-dbi/backends)). When a dm object is created via a DBI connection to an RDBMS, it can import all the tables in the database, the active schema, or a limited set. -For some RDBMS, such as Postgres and SQL Server, primary and foreign keys are also imported and do not have to be manually added afterwards. +For some RDBMS, such as Postgres, SQL Server and MariaDB, primary and foreign keys are also imported and do not have to be manually added afterwards. To demonstrate, we will connect to a `r href("relational dataset repository", "https://relational.fit.cvut.cz/")` with a database server that is publicly accessible without registration. It hosts a `r href("financial dataset", "https://relational.fit.cvut.cz/dataset/Financial")` that contains loan data along with relevant account information and transactions. We chose this dataset because the relationships between `loan`, `account`, and `transactions` tables are a good representation of databases that record real-world business transactions. -The repository uses a MariaDB server for which {dm} currently does not import primary or foreign keys, so we will need to add them. Below, we open a connection to the publicly accessible database server using their documented connection parameters. Connection details vary from database to database. Before connecting to your own RDBMS, you may want to read `vignette("DBI", package = "DBI")` for further information. @@ -114,7 +113,7 @@ Below, we create those links in 3 steps: Then we assign colors to the tables and draw the structure of the dm. Note that when the foreign key is created, the primary key in the referenced table does not need to be *specified*, but the primary key must already be *defined*. -And, as mentioned above, primary and foreign key constraints on the database are currently only imported for Postgres and SQL Server databases, and only when `dm_from_con()` is used. +And, as mentioned above, primary and foreign key constraints on the database are currently only imported for Postgres, SQL Server databases and MariaDB, and only when `dm_from_con()` is used. This process of key definition needs to be done manually for other databases. ``````{r }