Académique Documents
Professionnel Documents
Culture Documents
Using the products of requirements analysis Verbal and written communication among users and designers Knowledge of meaning of data
Abstraction Use of some modeling discipline (Data Model) Use of a representation technique
Analysis of business rules/semantic constraints (these are typically beyond the capability of the data model)
Types of Abstractions
Classification A is a member of class B Aggregation B,C,D are aggregated into A A is made of/composed of B,C,D
Generalisation B,C,D can be generalised into A, B is-an A, C is- an A, D is-an A Specialisation A can be specialised into B,C,D B,C,D (special cases of A)
Classification Abstraction
q
Relationship between a class and its members John Smith, Sheela Patel, and Peter Wang are all employees. They are all members of a class: EMPLOYEE class
In object-oriented modeling : MONTH : an Object type or class January December : objects that belong to class MONTH
Collection of similar entities or concepts into a higher level concept EMPLOYEE class collects all employees into one class A class has properties called class properties EMPLOYEE class has class properties - e.g., average salary, total number of employees Each member has values for own properties (e.g. name, address, salary): called member properties
q q q
Aggregation Abstraction
Defines a new class from a set of classes which are identified as components of the root class
Manager Employee
Name, Sex, and Position aggregate into Person. They are classes themselves. Ram, John, Carlos are classified into Name or Name is a classification of Ram, John, Carlos
OWNERSHIP
CAR
OWNER
Identification
Identifies one concept (an instance of it) from another concept.
Name
Number
Cardinality Constraints
Cardinality Constraint: Quantification of the relationship between two concepts or classes (a constraint on aggregation) MINIMUM (A,B) = n
At a minimum, one instance of A is related to at least n instances of B. n=0 n=1 n = inf. MIN(A,B) = 0 MIN(A,B) = 1 Min (A,B) = inf. MIN(Person, Car) = 0 MIN(Cust, Ship-address) = 1 Not possible MIN(Car, Wheels) = 4
n = x (fixed) MIN(A,B) = x
n = x (fixed) MAX(A,B) = x
Participation Constraints
Modeling EER shows complex relationships between objects in a database (multimedia, geographical). Concepts of subclasses and superclasses, specialisations and generalisations. Put concepts in diagram to form EER model
Model Shapes
When
you have more than one subclass based on the same defining attribute (JobType), use To show class/subclass relationships, use
Used
To
We
Entity
Weak
Entity:Entity sets that are not uniquely identified by their attributes A weak entity set has an "identifying relationship" with an entity set that is the "identifying owner" of the weak entity set
Student
Lecture
Dependants
Each member of subclass is a member of its superclass Not all elements in superclass need to be in subclass
Type inheritance
Subclass
describing similar concepts more than once Add more semantic information to design
Specialisation
Subgrouping into subclasses (top-down approach) Example: EMPLOYEE -> SECRETARY MANAGER, etc. Inheritance Inherit attributes and relationships from superclass (Name, Birthdate, etc.) Subclasses may have unique attributes
SECRETARY
Specialisation (cont.)
Primary key attribute are underlined SSN Name EMPLOYEE JobType d PayMethod WORKS_IN
U
ENGINEER d
DEPARTMENT
SECRETARY
SOFTWARE_ENGINEER
U
U
U
SALARY_EMP.
U
HOURLY_EMP.
Generalisation
Reverse processes of defining subclasses (bottomup approach) Bring together common attributes in entities Example: CAR (with attributes color, Nopass, max speed) and Truck (with attributes price, NoAxles) can be generalised into VEHICLE (with attributes color and price).
price
VEHICLE
d
VehID
Nopass CAR
Maxspeed
NoAxles
TRUCK
Tonnage
Constraints
Disjoint
an entity can be a member of at most one subclass of a specialization d Overlap an entity may belong to more than one subclass of a specialization o Total specialisation each entity of a superclass belongs to some subclass of a specialisation Partial specialization each entity of a superclass does not have to belong to some subclass of a specialisation
Partial category
Fax Address PERSON u Tel Name
ACCOUNT_ HOLDER
COMPANY Tel
BName BAddress
Total category
Selling Price
Closing Date
Rent
IDP
PROPERTY
Address
Every occurrence of superclass must appear in the category Better represented as specialisation (share many attributes and keys)
SECRETARY
U
ENGINEER
U
SOFTWARE ENGINEER
SECRETARY
ENGINEER
U
U
U
MANAGER
ENGINEERING MANAGER
Union Types/Categories
Models
a class/subclass with more than one superclass of distinct entity types. Attribute inheritance is selective.
PERSON BANK COMPANY
U
OWNER
The category, OWNER, is a subclass of the union of PERSON, BANK, and COMPANY. OWNER is either a PERSON or a BANK or a COMPANY
Mathematical Notation
Super/Subclass
Relationship
a superclass: G (Si) G
Mathematical Notation
Constraints
Total: U (Si) = G Partial: U (Si) G Disjoint: Si Sj = (empty set) for i j Overlap: Si Sj (empty set) for i j a set of superclasses: (D1, D2, .. , Dn) T (D1, D2, .. , Dn)
Categorisation
Modeling Methodologies
in software engineering: UML, OMT, specify operations applied to objects (entities) class = entity type (attributes) + operations
Object
class: entity type, object: entity association (link): relationship (rel. instance) multiplicity: relationship constraint
min..max (* : no maximum
(relationship constraints)
association
(relationship types)
4-33.1
disjoint
4-33.2
35
types of degree 2 are called binary Relationship types of degree 3 are called ternary and of degree n are called n-ary In general, an n-ary relationship is not equivalent to n-binary relationships
4-34 36
UML Class Diagram Class Object Attribute Domain Structured Domain Operation Association Link Multiplicities
EER Diagram Entity Type Entity Attribute Domain Composite Attribute ~ [Derived Attribute] Relationship Type Relationship Instance Cardinality & Participation
EER to UML #1
EER to UML #2