0% found this document useful (0 votes)
21 views8 pages

Understanding Categories in Hierarchical Structures

Cs

Uploaded by

devileela921
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views8 pages

Understanding Categories in Hierarchical Structures

Cs

Uploaded by

devileela921
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Categories,Disjoint,Overlapping

Abhirami T
Subclasses and Superclasses:

Allows for the creation of hierarchical structures where a superclass


can have one or more subclasses.

Each subclass inherits attributes and relationships from its superclass


and can have its unique attributes and relationships.
Categories

• A category has two or more superclasses that may represent distinct


entity types, whereas other superclass/subclass relationships always
have a single superclass.
• In this case, the subclass will represent a collection of objects that is
a subset of the UNION of distinct entity types; we call such a subclass
a union type or a category.
For example, suppose that we have three entity types: PERSON, BANK,
and COMPANY.
In a database for motor vehicle registration, an owner of a vehicle can
be a person, a bank (holding a lien on a vehicle), or a company.
We need to create a class (collection of entities) that includes entities
of all three types to play the role of vehicle owner.
A category (union type) OWNER that is a subclass of the UNION of the
three entity sets of COMPANY, BANK, and PERSON can be created for
this purpose.
The superclasses COMPANY, BANK, and PERSON are connected to the
circle with the ∪ symbol, which stands for the set union operation.
An arc with the subset symbol connects the circle to the (subclass)
OWNER category.
If a defining predicate is needed, it is dis-played next to the line from
the superclass to which the predicate applies.
In Figure we have two categories: OWNER, which is a subclass of the
union of PERSON, BANK, and COMPANY; and REGISTERED_VEHICLE,
which is a subclass of the union of CAR and TRUCK.
Disjoint

The disjoint constraint only applies when a


superclass has more than one subclass.

If the subclasses are disjoint, then an entity


occurrence can be a member of only one
of the subclasses, e.g. postgrads or
undergrads you cannot be both.
Overlapping

This applies when an entity occurrence


may be a member of more than one
subclass’
e.g. some university members are both.
student and staff this is used to
represent the overlapping

You might also like