database - Inheritance relationship in ERD diagrams -


i have question inheritance representation in erd-diagram. following example: have plane, , have 2 types of planes 1-personsplane 2-cargoplane confused relationship use ( 1-to-1 or 1-to-many). db teacher told should use 1-to-1 relationship, have found on internet many examples use (1-to-many) relationship instead of (1-to-1) . check these images:

one-to-one relationship

one-to-many relationship

which 1 correct??

inheritance relationship in erd should represented one-to-one relationship or 1 or zero-to-one relationship depending on case.

1) 0..1-1 : if there entity of plane since plane can exist without having child entity cargo or personal cargo , personal cannot exist without having parent plane entity.

2) 1-1: if each entity cannot exist self. pk in plane foreign key , primary key in cargo , personal child tables.

i don't think in case one-to-many , give example: db record of plane pk=1. 2 db record of personal plane foreign key=1 referencing 1 record in parent plane table. means there 2 children entities same key wrong. there must 1 referenced record in child table 0..1-1 or 1-1 relationship.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -