Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Example
The following screenshot shows an ERD to define for a data structure. It explains the properties for relationships.
Overview
Relationships are part of ERDs; see Understanding ERDs and Adding Content to an ERD. They represent the connection between a primary key attribute in one stream and an attribute in another stream. For example, the relationship line in the screenshot below shows that Teacher.Department contains the same data as the primary key SchoolDept.UID.
A stream's unique identifier is its primary key, and where it occurs in another stream, it is a foreign key.
The screenshot above shows that a relationship line has a one termination at the primary key and an arrow pointing to the foreign key. This line represents the 1 and many ends of the relationship.
PhixFlow automatically sets the properties for a relationship, except the description. To add a relationship description, click on the relationship line to open its properties. Relationships are not listed in the repository.
Properties
Basic Settings
The following settings are read-only. they are set automatically from the ERD.
school. The diagram has 6 tables, which entities in the school. The tables are linked by lines representing relationships between the data.
The tables are:
- SchoolDept is a simple table that defines the UID and Name for departments in the school. UID is the primary key and Name is the display name.
This table has relationships to the ClassRoom and Teacher tables. Because of these relationships, the ClassRoom and Teacher tables can both include a department name, without duplication. UID is the primary key and Name is the Display Name. - ClassRoom has details of the class room, with the department name provided by SchoolDept.
- Course has details of the courses. It takes the teachers name from the relationship to Teacher and provides the course name to CourseAttendee.
- Student has information about a student provides the student's name to CourseAttendee.
- CourseAttendee has details of the attendees of each course. This table takes data from relationships to both Course and Student tables and illustrates a many-to-many relationship between these two tables.