This article is outdated and has been replaced with a better explanation of parent and child records in the article Linking Forms (Form Relationships). The information below is accurate, but please see the aforementioned article for a more thorough explanation.
Contents
Overview
In several areas of Zengine, 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.
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:
- One-to-one (1:1) Relationship
- 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.
Comments
0 comments
Please sign in to leave a comment.