What are Parent and Child Records?

In several areas of Zengine (including forms and conditional formatting to name a few), you will see the terms 'parent' and 'child' utilized in order to describe the relationship between records, forms, and objects. For example, two forms may be linked to one another in a parent-to-child relationship. This article explains the concept further.

In this article

Overview

A relational database is a system structured to recognize connections among stored items of information.  There are 2 main types of relationships that may exist within your database:

  1. One-to-one (1:1) Relationship
  2. One-to-many (1:M) Relationship

Examples

Let's imagine an example which will be utilized to demonstrate each of these relationship types.  Imagine you have created a database to track university enrollment.  Your database could track the following for each student, each captured in a form:

  • Course Registration
  • Dorm Room Selection
  • Vaccinations and Medical Forms

One-to-One Relationship

A one-to-one relationship (1:1) means that there is one child record for each individual parent record. Looking at the university registration example, vaccinations and medical forms would be a one-to-one relationship. Each student (existing in the parent form) would submit just one medical form at the beginning of enrollment (which would exist in the child form).

One-to-Many Relationship

A one-to-many relationship (1:M) means that there is only one parent record and multiple child records.    Each semester, a university student must register for a class. Thus, he or she would submit one-course registration form per semester.  There would be one student (parent form) with many course registrations (child form) over time.

Additionally, each year a student may wish to choose a new dorm; thus they would submit multiple dorm room selection forms, still connected to just one student.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.