Skip to main content
replaced http://dba.stackexchange.com/ with https://dba.stackexchange.com/
Source Link

True story: I was a student at my school, then I taught there. Then one of the teachers took my class. You need to account for silliness like this.

And a faculty member or student isn't necessarily a user either.

Use table inheritance.

Faculty : Individual : Party

Student : Individual : Party

Where : means inherits.

Party hasOne User

A contact is a relationship between two parties:

Party hasMany ContactRelationships belongsTo Party

See Ready-to-Use Database models exampleReady-to-Use Database models example for reference models.

True story: I was a student at my school, then I taught there. Then one of the teachers took my class. You need to account for silliness like this.

And a faculty member or student isn't necessarily a user either.

Use table inheritance.

Faculty : Individual : Party

Student : Individual : Party

Where : means inherits.

Party hasOne User

A contact is a relationship between two parties:

Party hasMany ContactRelationships belongsTo Party

See Ready-to-Use Database models example for reference models.

True story: I was a student at my school, then I taught there. Then one of the teachers took my class. You need to account for silliness like this.

And a faculty member or student isn't necessarily a user either.

Use table inheritance.

Faculty : Individual : Party

Student : Individual : Party

Where : means inherits.

Party hasOne User

A contact is a relationship between two parties:

Party hasMany ContactRelationships belongsTo Party

See Ready-to-Use Database models example for reference models.

Source Link
Neil McGuigan
  • 8.6k
  • 5
  • 40
  • 56

True story: I was a student at my school, then I taught there. Then one of the teachers took my class. You need to account for silliness like this.

And a faculty member or student isn't necessarily a user either.

Use table inheritance.

Faculty : Individual : Party

Student : Individual : Party

Where : means inherits.

Party hasOne User

A contact is a relationship between two parties:

Party hasMany ContactRelationships belongsTo Party

See Ready-to-Use Database models example for reference models.