Professional Documents
Culture Documents
entity types/sets
collection of entity instances of a particular entity type, characterized by a common set of attributes types of attributes: simple vs. composite single-valued vs. multi-valued stored (or, base) vs. derived key attributes: attributes whose values are distinct for each individual entity instance (establishes a uniqueness constraint on entities) a simple attribute is associated with a domain or value set, specifying the valid values for the attribute composite multi-valued attributes may be nested (a.k.a. complex attributes)
(1, 1)
SUPERVISION
(0, N)
NOTE: EMP.ename (lastname, firstname, middlename) -> composite {EMP.address} -> multi-valued: up to two addresses per employee EMP.age -> derived: current date - EMP.bday (in years)
relationship types/sets
a relationship type, R, among entity types E1, E2, En defines a set of association among entities from these types (referred to as the participating entity types); each relationship instance in R represents an association which includes exactly one entity instance from each participating entity type a relationship type is characterized by its degree and its structural constraints; furthermore, a relationship type may also have attributes one or more entity types may be associated via one or more distinct relationship types
relationship types/sets
degree of a relationship type: number of entity types associated by the relationship may be one of unary (a.k.a. recursive relationships), binary, ternary, n-ary
Structural Constraints
relationship types/sets
structural constraints on a relationship type: cardinality ratio or mapping cardinality indicates the number of relationship instances that an entity instance may participate in for binary relationships, the common mapping cardinalities are 1:1 (one-to-one), 1:N (one-tomany), or M:N (many-to-many) participation constraint indicates whether the existence of an entity instance depends on its being related to another entity instance via the relationship may be total (or obligatory) or partial (or optional)
optional
M:N
obligatory
(1,N) PROJECT
Structural Constraints
optional 1:1 obligatory
(1,1) PROJECT
HAS
DB
specialization/generalization
specialization process of defining a set of subclasses of an entity type; the entity type from which the subclasses are derived is the superclass of the specialization; superclass and subclass entities are also called generalized and specialized entities, respectively generalization the reverse process of abstraction, in which the differences of several entity types are suppressed to identify their common features
specialization/generalization
specialization typically used to denote that: certain attributes (a.k.a. specific or specialized or local attributes) of the superclass may apply to some, but not all, of the superclass instances; the common (a.k.a. generalized) attributes are depicted on the superclass some relationship types may be participated in only by instances that are members of specific subclasses
specialization/generalization
characteristics of specialization/generalization subclass membership: entity instances of the superclass that are members of a given subclass are identified through defining attributes or defining predicates disjointness constraint: indicates whether the subclasses of the specialization are disjoint or overlapping completeness constraint: specifies whether or not every instance in the superclass is a member of some subclass in the specialization; may be total or partial in general, specialization/generalization may have several levels
o chk = Y gchk = Y CHECK (chkno, bank, chkdate, amt) CCARD (ccardno, cctype, ccinst, approvalno, amt) ccard = Y
(1, 1)