CSE Roadmap

Common tier · about 3 hours · 5 parts

Part 2 of 5 · 1 min read

Specialization

A general entity split into specific subtypes, each with its own extra attributes.

Think of an "Employee" category at a company. It splits into "Manager" and "Engineer." Every employee shares some attributes, but managers alone have a budget they control, and engineers alone have a programming specialty.

In plain words: specialization splits a general entity into specific subtypes, each inheriting the general entity's attributes and relationships, while adding attributes of its own. The general entity is called a superclass; each specific one is a subclass. This is often drawn as an ISA relationship: "Manager ISA Employee."

A worked example. In the bookstore, a general Account entity could specialize into CustomerAccount and StaffAccount, where both share email and password_hash, but only StaffAccount has a role attribute.

The key lines. No SQL yet; this is still diagram-level planning, before the next module translates it into tables.

Account (email, password_hash)
  ISA CustomerAccount (loyalty_points)
  ISA StaffAccount (role)

Specialization, ISA relationship

Specialization splits a general entity (the superclass) into specific subtypes (subclasses), each inheriting the superclass's attributes and adding its own. The ISA relationship names this: "a Manager ISA an Employee."

Example: StaffAccount ISA Account, inheriting email and password_hash, while adding its own role attribute.