Hacker News new | ask | show | jobs
by thunderbong 48 days ago
Can you please elaborate? My understanding was that entities always have a 1:1 relationship with tables.

An example would be really helpful.

1 comments

Inheritance is one case. In an ER diagram, you may have Employee and Client entities which both inherit from a Person entity. You could choose to have these represented as a single table (with nullable fields where not relevant). They could be three completely separate tables with common fields duplicated across the tables. Or there could be three tables where one table has the common fields from Person with Employee and Client having foreign keys to this table along with whatever unique fields they have.