% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RelDataModel.R
\name{add_foreign_key}
\alias{add_foreign_key}
\title{Add a foreign key between two tables}
\usage{
add_foreign_key(
  x,
  fromTable,
  fromFields,
  toTable,
  toFields,
  fmin = 0L,
  fmax = -1L,
  tmin = 1L,
  tmax = 1L
)
}
\arguments{
\item{x}{a \link{RelDataModel}}

\item{fromTable}{the name of the referencing table}

\item{fromFields}{the name of the referencing fields}

\item{toTable}{the name of the referenced table}

\item{toFields}{the names of the referenced fields}

\item{fmin}{from minimum cardinality (default: 0L)}

\item{fmax}{from maximum cardinality (default: -1L ==> Infinite)}

\item{tmin}{to minimum cardinality (default: 1L)}

\item{tmax}{to maximum cardinality (default: 1L)}
}
\value{
A \link{RelDataModel}
}
\description{
Add a foreign key between two tables
}
