minimumPK: Find the minimum fields which make a valid Primary Key

View source: R/primaryKey.R

minimumPKR Documentation

Find the minimum fields which make a valid Primary Key

Description

Find the minimum fields which make a valid Primary Key

Usage

minimumPK(
  x,
  fieldOrder = character(),
  excludeFields = character(),
  maxFields = ncol(x),
  minFieldSet = character()
)

Arguments

x

a data.frame equivalent to a table (no duplicated registers, unique(x)).

fieldOrder

a character vector with the sorted preferences in the fields part of the PK.

excludeFields

columns which will be excluded from the potential primary key. Can be the index or the column names.

maxFields

maximum number of fields in th primary key.

minFieldSet

columns that will be forced to be included in the primary key.


jmaspons/dbTools documentation built on March 10, 2024, 7:30 p.m.