In the use of table relationship. What is the difference in the use of solid line and dotted line?
For Example
TABLE : MESSAGES / TABLE : USERS
An User have 0 or Many Messages.
Solid line or Dotted Line?
In the use of table relationship. What is the difference in the use of solid line and dotted line?
For Example
TABLE : MESSAGES / TABLE : USERS
An User have 0 or Many Messages.
Solid line or Dotted Line?
As stated at the comments, a dotted line indicates non-identifying relationship.
SOLID LINE => IDENTIFYING relationship
Definition from mySQL docs: An identifying relationship is one where the child table cannot be uniquely identified without its parent. Typically this occurs where an intermediary table is created to resolve a many-to-many relationship. In such cases, the primary key is usually a composite key made up of the primary keys from the two original tables.
Example: We have an application that registers the arrival time of the employees with this model:
user { id_user, name, department, job }
arrival_log { id_user, arrival_time, department }
Each row of arrival_log requires the user_id to be specified. Without the user_id, we wouldn't know who reached the offices. The entity arrival_log is a weak one because it depends on other entities' existence (user) to work.
DOTTED LINE => NON-IDENTIFYING relationship.
Definition: A non-identifying relationship is one where the child can be identified independently of the parent.
Example:
flower( flower_id, flower_latin_name, flower_type_id )
flower_type( flower_type_id, name, description )
The relationship between flower and flower_type is non-identifying because each flower_type can be identified without having to exist in the flower table.