reduce.database_schema: Remove database schema relations not linked to the given...

View source: R/reduce.r

reduce.database_schemaR Documentation

Remove database schema relations not linked to the given relations

Description

Filters a database schema's relations, keeping only the given relations, and those considered ancestors via foreign key references. Foreign key references involving removed relations are also removed.

Usage

## S3 method for class 'database_schema'
reduce(x, main, ...)

Arguments

x

A database schema, whose relations are to be filtered.

main

A character vector, containing names of relations to be considered as the "main" relations.

...

further arguments passed to or from other methods.

Details

This method takes a given set of main relations, rather than inferring them.

Using rejoin on the database resulting from decomposing a data frame with the reduced schema is likely to fail or return incomplete results.

Value

A database schema, with the auxiliary relations and foreign key references removed.


autodb documentation built on April 4, 2025, 5:12 a.m.