DBTABLES-class: 'DBTABLES' class

Description Details See Also

Description

This virtual class is intended for holding, in each slot, a data frame that can be written to (or read from) a table in a relational database.

Details

The idea behind this class is to store the tables that are dependent on each other via foreign keys, in order. Based on a simple naming convention, methods check the supposed primary and the foreign keys (cross references) of the tables.

Primary keys must be present in a column called ‘id’, which must not contain duplicates. Columns with foreign keys must be named like paste0(x, "_id") and then refer to the column ‘id’ in a preceding slot named paste0(x, "s"). Irregular plurals are not currently understood. The two columns must be set-equal.

For using another naming scheme for the keys, at least on of the methods pkeys and fkeys has to be overwritten in a child class, but none of the other methods. The same holds if slots should be included that are not treated as data base tables. split might then also need to be overwritten to not ignore these other slots when creating new objects of the class.

For the methods of DBTABLES, see DBTABLES-methods.

See Also

methods::Methods

Other dbtables: DBTABLES-methods, by, fkeys, fkeys_valid, head, pkeys, pkeys_valid, sort, split, summary, tail, update


pkgutils documentation built on May 2, 2019, 5:49 p.m.