230 likes | 352 Views
Handle the complexity. Five mechanisms to understand and handle our complex world: classification generalization aggregation composition and power types. Classification. When we classificate we apply a concept (in form of an object type) to object.
E N D
Handle the complexity • Fivemechanismstounderstandandhandleourcomplexworld: • classification • generalization • aggregation • composition • andpowertypes.
Classification When we classificate we apply a concept (in form of an object type) to object. It means that we only visualize the properties which are common to see similarities. Without this concepts (object types) we would only know that things are different. ”Student” Concepts ”Nisse Hall” ”Anna Svan” Referent Term ”Anna Svan” ”Nisse Hall” ”Student” ”Nisse Hall” ”Anna Svan”
Classification Object Object type 0..* is_an_instance_of Classify ?..* Cecilia Björk Anna Svan Woman Zlatan Nils Hall Student
Classification Object type Class is_an_instance_of is_an_instance_of (?)..* 1..* 0..* classify classify 0..* Object Object The reality Models Object type and class are almost the same thing?
Classification Woman Student Man Anna Svan Nisse Hall Cecilia Björk Zlatan
Classification • The objects does not group themselves. The objects form groups thanks to the concepts (in form of object types) that we apply or place at the objects. It is people that group/classify. • Note how children immediately see the difference between a dog and a cat. They seem to be able to understand the difference between the concept (the object type) dog and the concept (the object type) cat.
Generalization Generalizationmeansthatconcepts,i.eobjecttypesthatentirelyincludesorcompriseotherobjecttypesaredistinguished ”Woman” ”Cecilia Björk” ”Person” When we are generalizing we show if object types – not objects - have something in common. ”Anna Svan” ”Student” Referent ”Nisse Hall” Concepts ”Cecilia Björk” ”Anna Svan” ”Anna Svan” ”Nisse Hall” ”Student” ”Person” ”Kvinna Term ”Nisse Hall”
Generalization ”Woman” Person ”Cecilia Björk” ”Person” Woman Student ”Anna Svan” ”Student” ”Nisse Hall” Concepts The reality Models
Generalization - notation Person Student Student Woman Person Nisse Hall Anna Svan Zlatan Cecilia Björk Woman
Generalization set Person Student Student Woman Man Person Nils Hall Anna Svan Zlatan Cecilia Björk Woman Man
Generalization Person Person Woman Eva Strid Man Cecilia Björk Zlatan Woman Man Anna Svan Nils Hall
Generalization – inheritance Person Cecilia Björk Person Student Superclass of Student personalnr Zlatan Anna Svan Nils Hall Student Eva Strid Subclass of Person studentregnr
More examples of generalization Person Student Cecilia Björk Person personalnr Lärare Anna Svan Eva Strid Arne Stolt Nils Hall Student Teacher Zlatan studentregnr emplyeenr eva strid:Student eva strid:Teacher arne stolt:Teacher personalnr = ”770102-XXXX” studentregnr = ”66566366” personalnr = ”770102-XXXX” employeenr = ”177745” personalnr = ”701113-XXXX” employeenr = ”177750”
Classification och generalization Classification: Object Object type 0..* is_an_instance_of classify 1..* Generalization: is_a_subclass_to 0..* Object type is_a_superclass_to 0..*
Classification or generalization? Test if following is a classification or a generalization! 1. Shep is a Border Collie. 2. A Border Collie is a dog. 3. Dogs are animals. 4. A Border Collie is a breed of dog. 5. Dog is a sort.
The reality and models – again Person Person Generalization Generalization Nils Hall Cecilia Björk Eva Strid Zlatan Anna Svan Woman Man Man Woman Classification Classification ceciliaBjörk:Kvinna zlatan:Man Nils Hall Eva Strid Cecilia Björk evaStrid:Kvinna nilsHall:Man Anna Svan Zlatan annaSvan:Kvinna The reality Graphical models/diagram
Aggregation och composition Rabbit Order 1 1 1 Aggregation Composition 2 4 0..* Ear Leg Order line
Composition Composition: Generalization: is composed of is_a_subclass_to 0..* 0..* Object Object type is part of is_a_superclass_to 0..* 0..* Classification: Object Object type 0..* is_an_instance_of classify 1..*
Abstraction Composition, aggregation, generalization and classification can be looked at as different types of abstraction. Note that some authors think that only the classiffication is abstraction. There are also authors who thinks that neither composition, aggregation, generalization nor classification are abstractions but to abstract is to start from the reality and to create models.
Why Power Type? Dog name weight breed average_weight maw_strength(forgermanshepherds) back_length(fordachshunds)
Why Power Type? Dog name weight breed average_weight German shepherd Dachshund maw_strength back_length
Why Power Type? Breed 1..1 breed_name average_weight Dog 0..* name weight German shepherd Dachshund maw_strength back_length
Why Power Type? Breed 1..1 breed_name average_weight Dog 1..1 0..* name weight 1..* Criteria German shepherd Dachshund criterion_name maw_strength back_length 1..* 0..* Dogshow Show_name responsible hall