Referential Integrity Rules in LibreOffice Base

Maintaining data consistency is essential in database design, and LibreOffice Base provides several referential integrity rules to manage relationships between tables. This article explains the relational integrity options available in LibreOffice Base—specifically update and delete rules such as Cascade, Set Null, Set Default, and No Action—and how each rule behaves to prevent orphaned records in your database.

Accessing Relation Properties in LibreOffice Base

To configure referential integrity rules, navigate to Tools > Relationships from the main LibreOffice Base menu. When you create a relationship between a primary key in a parent table and a foreign key in a child table, double-clicking the relationship line opens the Relations dialog. This dialog provides specific options for handling both Update and Delete actions.

Relational Integrity Rules for Deleting Data

When a record in a parent table is deleted, the corresponding records in the child table are affected according to the selected delete rule:

Relational Integrity Rules for Updating Data

When a primary key value in a parent table is modified, LibreOffice Base handles the linked child records based on the selected update rule: