Database Design – Why Not Have Persons for Every Person in Schema?

database-designschema

I noticed that a lot of database schemas often show like, "students" or "teachers" or "employees" or "passengers" or something to that affect.

Why not have a schema where every individual is a person and is in Persons table and if went to look for "student", we call "students" table which links its person id to the id in Persons table to get data.

Students may become teachers so the data from students table can be updated/removed and be added in "teachers" table.

Why is that not common? What would be a problem with having "Persons" table rather than to have a table of people of a given position?

Best Answer

Many databases are designed exactly this way. This pattern is known as class/subclass in object modeling, generalization/specialization in ER modeling, and sometimes referred to as type/subtype in other places.

There are several techniques for accomodating class/subclass patterns in table design. For more details, see the tag.