Notation and Cardinality
IE Notation
Cardinality
One-to-many relationship is represented by this symbol: ![](/pt-br/technical-documents/image/2c103914-5416-4e0e-8695-01c74d10bc5f)
One-to-one relationship is represented by this symbol: ![](/pt-br/technical-documents/image/a256a650-2110-4973-b609-2381a6ac6def)
Parent: mandatory Child: mandatory
![](/pt-br/technical-documents/image/08c08468-c4e7-4cd4-84b3-ff009abda664)
Parent: mandatory Child: optional
![](/pt-br/technical-documents/image/8634bfe8-5dbe-4840-b4f5-faf1099d42f4)
Parent: optional Child: mandatory
![](/pt-br/technical-documents/image/4eb2eb90-2cfd-4519-85da-a52f1c4771f1)
Parent: optional Child: optional
![](/pt-br/technical-documents/image/330cc710-3463-4bed-9a5f-6fe082ed69d6)
IDF1X Notation
![](/pt-br/technical-documents/image/4ca6016d-4640-4fc1-abcc-f09754c55ec4)
Cardinality
,
,
zero, one or more
one or more
zero or one
Parent: mandatory Child: mandatory
![](/pt-br/technical-documents/image/9d8447e6-d44e-4510-8842-73653da27580)
Parent: mandatory Child: optional
![](/pt-br/technical-documents/image/85bdb818-66f5-4cff-b4b2-11c1ddcd3469)
Parent: optional Child: mandatory
![](/pt-br/technical-documents/image/5b9f6b0b-57ab-49d4-a287-b91a396f42b4)
Parent: optional Child: optional
![](/pt-br/technical-documents/image/d9afdf10-5383-4ac0-9d51-1d9e694d980f)
See Synchronization of Not Null and Mandatory Parent for more information.
Relationship Types
Identifying Relationship
![](/pt-br/technical-documents/image/8634bfe8-5dbe-4840-b4f5-faf1099d42f4)
![](/pt-br/technical-documents/image/0d5400a5-1c19-49f3-a6e4-6f63d5e787ce)
Non-identifying Relationship
![](/pt-br/technical-documents/image/8883aada-00b4-4d0d-bb3b-b367bd56c892)
![](/pt-br/technical-documents/image/a9aed225-8ec2-4f61-9fea-f9050b040793)
Non-identifying Self-relationship
![](/pt-br/technical-documents/image/d710520e-fbf5-4eb9-a65c-87a3cd6661b1)
![](/pt-br/technical-documents/image/61b3b0ad-94f0-4767-a741-d9c673338e86)
M:N Relationship
![](/pt-br/technical-documents/image/24dbcc74-bc08-4eec-8a59-0134947ab217)
![](/pt-br/technical-documents/image/4b336065-031c-44c7-a169-bf09487998a4)
Mandatory/Optional Parent/Child
To set Parent/Child entity as Mandatory/Optional
- Double-click a relationship on workspace to open Relationship Properties.
- Switch to the General tab and check/uncheck Mandatory Parent/Child checkbox in the Cardinality section.
Parent: Mandatory
Child: Mandatory
A teacher MUST teach a lecture (the record related to lecture is mandatory), a lecture MUST be taught by a teacher (the record related to teacher is also mandatory. Teacher is Mandatory.)
Parent: Mandatory
Child: Optional
A teacher MAY teach a lecture (the record related to lecture is Optional), a lecture MUST be taught by a teacher (Teacher is Mandatory.)
Parent: Optional
Child: Mandatory
A teacher MUST teach a lecture (lecture is Mandatory), a lecture MAY be taught by a teacher (teacher is Optional).
Parent: Optional
Child: Optional
A teacher MAY teach a lecture (lecture is Optional), a lecture MAY be taught by a teacher (teacher is Optional).
The information can be found on Relationship Properties form, see graphical representation at bottom of the form.
Set up Referential Integrity Rules
To set up referential integrity rules for Parent entities
Open the Relationship Properties form and see the Referential Integrity group box.
Here, you can change the None rule to:
- Restrict
- Cascade
- Set Null
- Set Default
The default rule can be re-configured.
|
Note: Some databases do not support Referential Integrity (RI) rules. |
Connect Parent and Child Entities
Toad Data Modeler allows you to connect Parent and Child entities through the following unique values:
- Key (Primary or Alternate Key) of parent entity
- Unique Index of parent entity
To change the linking method
- Open the Relationship Properties form and see the Relationship Type group box.
- From the Parent Key box, select the method. If neither Unique item, nor Alternate Key exists, only the Primary key is available.
|
Note: Some databases do not support Alternate Keys. |