ADMS-BIS Bouwkundige Informatiesystemen ADMS 2006 UML part 2 Jan Dijkstra - 30 oktober 2006.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

7M822 UML Profile for Databases 11 November 2010.
Chapter 6: Entity-Relationship Model (part I)
ADMS-BIS Bouwkundige Informatiesystemen ADMS 2006 UML part 2 Jan Dijkstra - 16 oktober 2006.
Entity-Relationship (ER) Modeling
Modeling Main issues: What do we want to build How do we write this down.
Database Systems: Design, Implementation, and Management Tenth Edition
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Stereotypes Stereotypes provide the capability to create a new kind of modeling element. –They can be used to classify or mark modeling elements. –A type.
Object-Oriented Analysis and Design: Object Modeling – Class Diagrams
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML – Class Diagrams.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
From Class Diagrams to Databases. So far we have considered “objects” Objects have attributes Objects have operations Attributes are the things you record.
Informatiesystemen in de Bouw 7M711 Joran Jessurun en Jos van Leeuwen Week 3.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Class Diagram & Object Diagram
7M822 UML Class Diagrams advanced concepts 15 September 2008.
7M822 UML Class Diagrams advanced concepts 14 October 2010.
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
The Unified Modeling Language (UML) Class Diagrams.
Entity-Relationship Design
Object Oriented Software Development
UML Unified Modeling Language. What is UML? Unified Modeling Language (UML) is a standardized, general-purpose modeling language in the field of software.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 8 Slide 1 Chapter 9 Structuring System Data Requirements.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Association Class Generalization/Specialization Whole-Part Page More Associations 1.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
Lab 04.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
CS212: Object Oriented Analysis and Design Lecture 13: Relationship between Classes.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
Class Diagram. Classes Software Design (UML) Class Name attributes operations A class is a description of a set of objects that share the same attributes,
Design Model Lecture p6 T120B pavasario sem.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Gegevens Analyse Les 3: Normaliseren. Chapter Premise We have received one or more tables of existing data The data is to be stored in a new database.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Class Diagram Lecture # 1. Class diagram A Class Diagram is a diagram describing the structure of a system shows the system's classes Attributes operations.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
UML Class & Object Diagram I
Object-Orientated Analysis, Design and Programming
Object-Oriented Modeling
Business System Development
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Entity-Relationship Model
Object Oriented Analysis and Design
Seminar 3 UML Class Diagram.
Software Engineering Lecture #11.
UML Class Diagram.
Analysis models and design models
ITEC 3220A Using and Designing Database Systems
Copyright 2007 Oxford Consulting, Ltd
Class Diagram.
Object Oriented System Design Class Diagrams
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

ADMS-BIS Bouwkundige Informatiesystemen ADMS 2006 UML part 2 Jan Dijkstra - 30 oktober 2006

ADMS-BIS Subjects

ADMS-BIS Exercise 30 October Ga uit van de MKW beschrijving van oefening van UML1 Identificeer enkele klassen Geef zo mogelijk relaties tussen klassen aan

ADMS-BIS An object is a thing that can be tangible or intangible. Examples tangible : bike, car, house intangible : order, account Objects An object has properties. Example a Customer has a name and address Customer Name Address

ADMS-BIS Property of object = attribute + value (Multiple) Objects Adacs: Customer Name = Adacs Address = Enschede Primo: Customer Name = Primo Address = Grave Multiple objects  unique identity 1247: Customer Custno = 1247 Name = Adacs Address = Enschede 9378: Customer Custno = 9378 Name = Primo Address = Grave

ADMS-BIS Link = connection between objects Connection between Objects 1247: Customer Custno = 1247 Name = Adacs Address = Enschede 345T7: Order Orderno = 345T7 dateReceived = 10/10/05 Price = U2: Order Orderno = 902U2 dateReceived = 07/04/05 Price = 3789

ADMS-BIS Class class is abstract concept each object is instance of a class classes classify objects attribute has no values Class Customer Custno Name Address Order Orderno dateReceived Price Object analysis  than values to attributes

ADMS-BIS Attribute has no values Association is relation between classes Class Diagram Customer Custno Name Address Order Orderno dateReceived Price Link is instance of association 1 *

ADMS-BIS Advanced Class Features

ADMS-BIS Advanced Class Concepts : Visibility Visibility – class members (attributes, operations) may be specified as: {we have feature f, an attribute or operation that is defined on an object O of class C } –+: public {f is public  f is visible to any object and f is inherited by the subclasses of C.} –# : protected {f is protected  f is visible only to objects of class C and to objects of C’s subclasses and f is inherited by the subclasses of C.} - : private {f is private  f is visible only to O and f is not inherited by the subclasses of C.} Restricting visibility is the same as restricting accessibility.

ADMS-BIS Advanced Class Concepts : Scope Individual member data (= attributes) may have: –Class scope : a single copy of an attribute is shared by all instances of a class. –Instance scope : each instance of a class would have its own copy of the attribute.

ADMS-BIS Advanced Class Concepts : Abstract An operation is abstract if it has no implementation. A abstract class cannot have any direct instances. Abstract classes only occur in the context of an inheritance hierarchy. Abstract operations and classes are specified by writing its name in italics.

ADMS-BIS Advanced Class Concepts : Abstract

ADMS-BIS Window as Abstract Class

ADMS-BIS Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined  object Objects arte abstractions of real-world or system entities and manage themselves. Objects are independent and encapsulate state and represent information. System functionality is expressed in terms of object services. Objects communicate by message passing.

ADMS-BIS Objects are abstractions of real-world entities. Objects encapsulate state and represent information. Object’s state is protected. Objects have responsibility. Objects interact by interfaces.

ADMS-BIS Conceptions Encapsulation Information hiding Responsibility

ADMS-BIS Encapsulation Encapsulation is the grouping of related ideas into one unit, which can thereafter be referred to by a single name. –Object-oriented encapsulation is the packaging of operations and attributes representing state into an object type so that state is accessible or modifiable via the interface provided by the encapsulation.

ADMS-BIS Information hiding Information hiding is the use of an encapsulation to restrict from external visibility certain information decisions that are internal to the encapsulation structure.

ADMS-BIS Responsibility Object oriented design is a responsibility driven design approach. –Objects have responsibilities that they prove oneself. –Therefore, collaboration with other objects is needed.

ADMS-BIS Classes and Objects Objects looks like modules in some ways Object = Identity + State + Behaviour Objects provide encapsulation of data object is described by a classAn object is described by a class. A class may define a number of objects with identical properties

ADMS-BIS About an Object operationsAn object has a public interface defining the operations (methods) it will support attributesAn object has private data called attributes, which only its own operations can access An object can have private operations for its own use linksAn object may know about other objects by means of links

ADMS-BIS Structural modeling essentials

ADMS-BIS Look back: Class - operations An operation is the implementation of a service that can be requested from any object of the class in order to affect behaviour. Operations are used to manipulate the attributes or to perform other actions. Operations are normally called functions, but they are inside a class and can be applied only to objects of that class. An operation is described with a return-type, a name and zero or more parameters. Together, the return-type, name, and parameters are called the signature of the operation. The signature describes everything needed to use the operation.

ADMS-BIS

Aggregation and Composition Aggregation is a special form of association that specifies a whole-part relationship between the aggregate (the whole) and a component (the part); aggregation is the part-of relationship. { it is a special form of association in which a collection of objects, each having an independent existence, is associated with an single object} {unfilled diamond} Composition is a form of aggregation with strong ownership and coincident lifetime of the parts by the whole; the part object may belong to only one whole – the parts are usually expected to live and die with the whole. {usually, any deletion of the whole is considered to cascade to the parts} {filled diamond}

ADMS-BIS Aggregation and Composition: Example

ADMS-BIS Derived Associations and Attributes Derived associations and attributes can be calculated from other associations and attributes, respectively, on a class diagram. –For example, an age attribute of a Person can be derived if you know that Person’s date of birth.

ADMS-BIS Relations and Constraints

ADMS-BIS UML for Database Design Database –A database is a collection of data. –Databases can be stored in one or more files, or can be managed by a software system called Database Management System (DBMS) What makes a database –Add Data –Delete Data –Change Data –Lookup or search for data –Organize Data

ADMS-BIS Key Terminology Table Column Record Field Primary Key Foreign Key

ADMS-BIS Database Diagram Elements Table Column Primary key Foreign key Identifying relationship Non-identifying relationship

ADMS-BIS Database Diagram Elements (2) Table (stereotype >) Not used Primary key (stereotype >) Foreign key (stereotype >) Primary/Foreign key (stereotype >) Non-identifying relationship Identifying relationship

ADMS-BIS Example 1

ADMS-BIS Mapping Logical Design To Database Design Synchronization Classes > Tables Attributes > Columns Associations > Relations Normalization There are more ways to do it

ADMS-BIS Mapping Classes To Tables Map persisted classes to tables Many to many associations must be broken down to one to many associations using an association table.

ADMS-BIS Mapping Subtype Classes to Tables One table per class One table per concrete class One table per hierarchy

ADMS-BIS Mapping Attributes to Columns Map persistent attributes Don’t map calculated attributes Can use Generic Types first, later use database specific types. Generic Types: Boolean, Currency, Date, Double, Integer, Long, Single, String

ADMS-BIS Example 2

ADMS-BIS Example Projecten

ADMS-BIS Database Example

ADMS-BIS Normaliseren Het verfijnen van een informatiebehoefte en het verder detailleren van een gegevensmodel wordt normaliseren genoemd. Normaliseren gebeurt in een aantal stappen die leiden tot zogenaamde normaalvormen. Met een denkproces kan men tot hetzelfde komen zonder dat men de specifieke normaalvormen hanteert. Uitgangspunt is een ongenormaliseerde groep, dwz alle gegevens elementen worden geidentificeerd.

ADMS-BIS Voorbeeld Het lenen van boeken bij de bibliotheek; er kunnen meerdere exemplaren van een boek zijn. Gegevens: ISBN titel omschrijving boekidentificatie aantal leendatum lener lenernaw

ADMS-BIS Normaliseren 1 Allereerst worden procesgegevens verwijderd en wordt een repeterende groep afgesplitst. De oorspronkelijke sleutel wordt overgenomen; deze zorgt voor de koppeling (relatie, associatie) tussen de groepen. Deze sleutel is niet voldoende samen met een ander gegeven vormt het een samengestelde sleutel. (1eNV) boekid isbn titel omschr aantal lenerid leendatum lenernaw boekid isbn titel omschr aantal boekid lenerid leendatum lenernaw

ADMS-BIS Normaliseren 2 Daarna geldt dat attributen functioneel afhankelijk moeten zijn van de gehele sleutel. Dat betekent dat de attributen die slechts van een gedeelte van de sleutel afhankelijk zin, in een aparte groep worden opgenomen. (2eNV) boekid lenerid leendatum boekid isbn titel omschr aantal boekid lenerid leendatum lenernaw boekid isbn titel omschr aantal lenerid leennaw

ADMS-BIS Normaliseren 3 Daarna worden ook attributen die ook functioneel afhankelijk zijn van andere niet-sleutelattributen in aparte groepen genomen. (3eNV) boekid lenerid leendatum boekid isbn titel omschr aantal lenerid leennaw boekid isbn aantal isbn titel omschr boekid lenerid leendatum lenerid leennaw

ADMS-BIS Resultaat BIBBOEK BIBBOEK boekid isbn aantal BOEK isbn titel omschr BOEKLENER boekid lenerid leendatum LENER lenerid leennaw

ADMS-BIS Database Desktop Example

ADMS-BIS Questionnaire A market research company develops written questionnaires for customers, carries out the market research and presents the results to the customer. The company would like to develop an information system to help them in their work. The information system is based on the following description. A questionnaire consists of a number of questions. Each question can appear in one or more questionnaires. A question always has one or more possible answers and each possible answer can be associated with one or more questions (for example, an answer "Yes" can be given to a large number of questions in the questionnaire). The chosen answer results in a number of points. The number of points depends on the combination of the question for which the answer was given and the questionnaire in which the question was asked. The answers given for a filled-in questionnaire are registered per question. The person filling in a questionnaire can also give a comment with some questions. He or she can also give a comment on the questionnaire as a whole. These comments are all registered in the information system. Comments with questions or on the questionnaire as a whole are not mandatory. Make a class diagram showing the most important object types. State any assumptions that you have made. Only functional relationships are allowed in the class diagram.

ADMS-BIS Questionnaire 1 Questionnaire A101 CustomA QuestionsAnswersPoints Question_Aanswer_1points0 answer_3points1 answer_4points7 Comment Question_Banswer_2points9 answer_3points2 Comment Comment questionnaire Questionnaire B341 CustomC QuestionsAnswersPoints Question_Aanswer_1points4 answer_4points1 answer_7points2 Comment Question_Danswer_4points9 answer_3points2 Comment Comment questionnaire

ADMS-BIS Questionnaire 2 Gegevenselementen Qn_id [custom] Qn_com Quest_id Quest_txt Quest_com Answ_id Answ_txt Points Qn_id [custom] Qn_com Quest_id Quest_txt Quest_com Answ_id Answ_txt Points

ADMS-BIS Questionnaire 3 Questionnaire Qn_idQuest_id Qn_id [custom]Qn_id Qn_comQuest_txt Quest_com Answ_id Answ_txt Points

ADMS-BIS Questionnaire 4 QuestionnaireQuestion Qn_idQuest_idAnsw_id Qn_idQuest_id [custom]Qn_idQuest_id Qn_id Qn_comQuest_txtQn_id Quest_comAnsw_txt Points QuestionnaireQuestionAnswersAnswTxt Qn_idQuest_idAnsw_idAnsw_id Qn_idQuest_id [custom]Qn_idQuest_idAnsw_txt Qn_id Qn_comQuest_txtQn_id Quest_comPoints

ADMS-BIS Questionnaire 5

ADMS-BIS Map to DataBase Model Design DB use Realize DB system For Example Realization DB system by MS ACCESS

ADMS-BIS MS Access DB Design (1 of 5)

ADMS-BIS MS Access DB Design (2 of 5)

ADMS-BIS MS Access DB Design (3 of 5)

ADMS-BIS MS Access DB Design (4 of 5)

ADMS-BIS MS Access DB Design (5 of 5)