Home

Introduction to ERD modelling using UML Class diagrams with

image

Contents

1. 1 C Pr icDraw UML 2 C um GP syster 3 C Pr UML samph Desktop picture s My Documents Sr My Computer For word emf or wmf are good templates UninstallerData update Select All File name travel agency My Network Places Files of type Joint Photographic Experts Group jpa jpeg X Encapsulated PostScript eps Enhanced Metafile Format emF Joint Photographic Experts Group jpa jpeq Portable Network Graphics png Scalable Yector Graphics svq Windows Metafile Format wmf 1 Select the appropriate format to save the processing document e g Microsoft Word by using the copy on the fly technique see above Then when in the word processor e Attempt to reduce the size of the picture by dragging a corner of it on the page so that it takes up about a quarter of a page e Copy some text and right click on the picture to bring up the format picture option then select layout gt square Notice how the text now wrapes around it e Go to page setup gt orientation to change between portrait and landscape mode e Finally read in the word processing help files about creating continuous section breaks so that you can create documents with some pages in portrait and others in landscape orientation This is important when you have many diagrams in a document Mastering these techniques Is vitally important to create well prese
2. Custoh i p Data crv lic J trite a 0 private J true D MagicDraw UML Personal Edition 12 1 autosave md File Edit View Layout Diagrams Options Tools Ctrl N Ctrl O Remember to always save your project H New Project BS Open Project lose Project Ss amp Close All Projects Use Module Save as Image Page 13 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw 4 6 Completing the diagram The completed scenario consists of four Entities classes shown opposite reservation travel agent agent id String gt cade String og agent name String reservation date gt date If it were a true ERD rather than a cross between a agenty phone String room type String UMI class diagram and a ERD we would also include Foreign key fields attributes That is in the reservation Entity type class we would have two more fields attributes FK_travel_agent_id and FK_room_id Similarly room would have FK_property_id Similarly if this were a correct UML class room id String diagram we would not include the Instance max number Integer object IDS such as agent_id and property_id children boolean and certainly not have foreign keys Hogs boolean Cost String Exercise 6 Inspect the class diagram opposite and attempt to imitate it Also remember to save your project Well done you have nearly f
3. Find in Diagram Chrl ShiFk D Related Elements G Print Active Diagram Layout b Snap Shapes to Grid Grid Size Snap Paths to Grid Close Diagram Ckrl F4 Close All Diagrams But Current Ckrl Shitt F4 Clase All Diagrams Ctrl alt F4 robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 7 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw 4 3 Creating Classes i E travel agency 1 click here first to make om z HH a k sure you are in selection Common package Ds mode Note PO ls vecuer ee Geant op Gated wn ny eee reer ene abe Text Box 2 Click on Class then click where you want the new class to appear on the Image Shape canvas Separator H anchor Dependency an Class Diagram amp Interface 3 3 3 3 3 3 3 3 PY Package 3 PEPS BBP PERSE PENE EOTE PNS PEI Generalization i a a OO OO OO OO OO OO Once you have positioned the new class on the canvas a rather cluttered object appears this is because of something called Smart Manupulation a feature that the company claims makes using the software easier Basically each of the dots icons allow you to add edit or remove various elements from the class to find out more go to help gt user manual A similar feature exists in Visual Paradigm called the Resource Centric Interface There are two ty
4. Pender Features Model Decomposition Samples include explanation how model decomposition is implemented in MagicDraw Samples of possible usage cases and hints for using decomposition are included Model Transformation Sample of UML model transformation to XML Shema and to generic DDL Messages Window iagram type Content Diagram is not registered Diagram Diagram Shapes mprovements will be loaded as Class Diagram iagram type Content Diagram is not registered Diagram Intro will be loaded as Class Diagram a ie ite besme Te eb eh Mie eee ie eh ne minke din ee eee PHIL Abe Rin ie 1 HL I de de ol ee ie zl Text Box Online Demo View online demo for MagicDraw features Download MagicDraw resources You may download SysML plugin Plugin includes SysML profile all SysML diagrams System engineer user perspective with custo E start Z ZoneAlarm Security Suite E c magic draw downloads D7 MagicDraw UML Pers W draft_magicdraw_tutora When you have had enough Click on the menu option File gt L Close all projects You are now ready to begin i robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Address 1s Q899 H 2 Tools Edit View Layout Diagrams Options Ctrlt N Uh Chrl o New Project Open Project Save Project Close Project Use Module Save as Image Print Ctrl P Print Preview Opened P
5. Re b T Constraints a d B ae ma h es 4 BP an O I E N a T a P 5 a The diagram then gets updated to Repeating the above Ep process for the two j AER agent_ia other attributes agentid String agent_name results in agent_name String agency phone String agency phone String Exercise 3 Please carry out what have described above robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 10 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw repeated the above exercise by adding the following attributes and specifying there type in the reservation entity type class Data Type code character Reservation date MagicDraw UML Personal Edition 12 1 autosave md Resulting in r travel_agent agentid String Edit view Layout Diagrams Options Tools reservation D New Project eS Han Hee code String om reservation cate date roam_ type String agent_name String agency phone string bi lose Project 2 Close All Projects Use Module Remember to always Save as Image Save your project Exercise 4 Please carry out what have described above 4 5 Defining a Relationship among the Classes At this point two classes i Magicoraw u E have been defined Now it is ae Find associatior 6 Peni
6. are several ways to create a new diagram you can either click on the class diagram icon or select the menu option Diagrams gt Class Diagrams Aq MagicDraw UML Personal Edition 12 1 travel agency mdzip C uml travel agency travel agency gt File Edit view Layout Options Tools Analyze Window Help Create or open an existing Class diagram by clicking Use Case Diagrams Chrl 2 Diagrams Communication Diagrams Chrl 3 Sequence Diagrams Ctrl 4 State Machine Diagrams Ctrl 5 El Diagrams HE Activity Diagrams cea H Class Diagrams i Communication Diad gg a Eg Composite Structur PS Dependency Matrix HA si ff Implementation Dial pa E Te HE Protocol State Mac a ff Sequence Diagrams Protocol State Machine Diagrams Chrl 6 Activity Diagrams Chrl Implementation Diagrams Chrl 8 Composite Structure Diagrams hrl 9 Dependency Matrixes Customize Alt Lett Alt Right Previous Diagram Next Diagram Load All Diagrams Select the menu option Diagrams gt class diagram Follow the instructions opposite to create a class diagram called travel agency General Type Class Diagram name travel agency Select owner for diagram El BERS H E ML sta 9 Type travel agency for the new diagram name Class Diagrams 1 Click Add ES travel agency Click Close So that you can begi
7. at the same time it did expose you to the software Moving on to UML will provide you with an opportunity to make use of many of these options and discover the richness of UML Robin Beaumont Monday Tuesday 04 October 2011 robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 17 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw 8 Appendix Installing MagicDraw Details for obtaining Magicdraw are given on page 2 Remember you need the licence unlock key in the form of an xml file saved on your local machine before installing MagicDraw Make a note of where it is During or after installation you are asked to provide a licence unlock key Click on the Select unlock key option ioixi To browse For MagicDraw 12 1 application andor plug in key File s click Select Unlock Key File s button gt To connect to Floating License Server and obtain Use Floating License Floating License click Use Floating License button IF you do not have key File s login to Get the Key http Saw magicdraw com by clicking Get the Key button and download them Cancel Help You will then be asked to indicate where the licence unlock key file is navigate to the correct folder You will then be asked which predefined Magicdraw configuration you want Select System Analyst and then click OK You can always change this from the MD menu Optio
8. but important subset that of creating a ERD Entity Relationship Diagram robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 2 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw 2 The Scenario For this tutorial we will be using the following scenario The business we are modelling is a Travel Agency In the Agency a Travel Agent will make one or more Reservations for a Customer A Reservation is associated with a particular Hotel Room at a particular Property and the Hotel room is associated with zero or more reservations over time I have highlighted the proposed Entity tyoes Classes 3 Why Use a UML Class magram to a ERD diagram In the past have introduced ERD diagramming tools then moved onto UML diagramming tools which invariably has led to confusion and the inability of some students to move onto the more complex aspects of UML In an attempt to avoid this have decided to introduce a simplified UML class drawing technique to allow the drawing of a ERD roughly semantically equivalent as a way of demonstrating how ERDs can be created using a UML mindset and also highlight the relationship between ERD s and UML class diagrams travel_agent agent_id String __ code String agent_name String reseryvation_date date agency_phone String room_type String on a String umber Integer Een boole
9. p Select Model Element Symbol classes conceming a Hotel T Click on Hotel to link the Property class to it Bact Be Relations EEA UML Standard Profile UML _Standard_Profile xml oe J bill E E guest J manager i e property i e reservation i LE room l travel_agent n F hotel ve BL travel agency ip a Diagrams Hg Activity Diagrams a ical i oe e ency pen i Communication Diagrams 3 OK Cancel Help The Property Class on the diagram then indicates the hyperlink robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 16 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw 6 4 Adding Documentation to a Diagram di travel agency _ E t ae oe eee e EE package Datal 2 travel agent g 4 Common abe Text Box E Anchor 5 HTHIL Mote HTML Text CS Comment Containment A CommentiHTML Text A Dependency Ee Image Shape text box Separator You can create Notes on diagrams 4 types and also Test boxes 7 Conclusions for this Tutorial In this tutorial you have learnt the basic steps for creating and manipulating a simple UML class diagram which can be considered to be similar to an ERD diagram Because the MD PE product was not designed for this purpose you may have been confused by the many options that you did not make use of but
10. r majhen a i n noom nEs a m t i a aa D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx time to link these classes in an association In this example we will link the classes with a one to many association Before actually drawing the relationship take a look at what the MD PE s help file has to say on the topic of associations You can see this by opening the help menu option Help contents then following the details opposite The latest version of help has moved the required help shown on the left to the third of fourth option down Page 11 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw At the bottom of the information a list of the types of multiplicity can be seen given below to refresh your memory Multiplicity The multiplicity value of association end A O zero and only zero 1 one and only one O 1 zero or one ry x O 1 Follow the instructions below to create an association O Package af Generalization Association 7 ef Aggregation of Composition a InterFace Reali ah Usage a Abstraction E Instance Link Rs Use Case Diagram qq Implementation Di i Composite Struct cal Information Flows from zero to any positive integer from one to any positive integer any positive integer 1 Click on Association 2 Click on the first class 3 Click on th
11. Association BP diagram 7 Neary Association 7 UML 2 0 in Class diagram 7 Association Class 6 Compensation Association 5 Select Attripbutes Associatio E Link 4 Creating relationships amo 5 Drawing a link between two 3 Creating associations from 3 UML 2 0 Elements 2 Drawing associated classe 2 Assigning behavior diagra 2 Connector End 2 Connector 2 Drawing a generalization lir 2 Felations pane 2 Initializing roles at both ass 2 Initializing opposite associs 1 Default values 1 M an Association robin organplayers co uk 1 enhance Hrana and dean bi a ee E a a F ir ee To bring up the help window 1 you need access to the internet 2 Select menu option Help Help contents 3 Select the lens icon and type in association 4 select the first found item Me ends are defined by the Properti memberEnd which is assigned to the Prope Associations Properties play the role of mefr Properties that function as memberEnds ote the EERME The default value of a member End property g An association describes a set oftuples m association is called a link An association specifies a semantic T least two ends represented by properties eact than one end ofthe association may have the owned by an end class orthatis a ber association is navigable from the opposite opposite ends a To show association ends as attributes o 7 B d w Pi
12. Introduction to ERD modelling using UML Class diagrams with Magicdraw ver 17 Robin Beaumont robin organplayers co uk Tuesday 04 October 2011 Contents 1 Nai gel 10 67 eq kareena Sette eer en re ene ete eee ee ee ee ee ee eee 2 Medio REINO CG SUIS NN ese tees ee cect sje veut E E E E EE 2 1 2 Where to obtain the software siscccsscescraezecescies cosessencdessasiieeatancedeasaescedexsussdnasaedcarsteoteienrieceadexsavedeezacdeepenees 2 1 3 Before you begin this tUtOrial cccceccccccccsssseeecceeeeceeeceeeseeeeeceeaeeeeeceuaeceeesseaseceeesseaueeeeesseaeeeesessaagss 2 1 4 What are the aims of this tutorial ec ccecccccceceeseseeeeeeeeseeeesseeseceeeeeeaeseeseeseaeeeeeeeseeseeeeessaageeesesaaaees 2 PING CORO ae E E E E 3 Why Use a UML Class diagram to represent a ERD diagram ccccccseeeeeneeeeeeees 3 3 1 Differences between UML Class diagrams and ERD S cccsccccccseeeeeeeeeeeeeceeeeeesueeeeeseeeeeeseeeeeesaess 4 a 121g 118 61 OND PA eer e re rm ee eee eee es 4 4 Creating and eding a new FIO CCl ccacerce dorececacoucceaacocecteecoauedencancetee donestaneauceesncoeecasecaates 5 4 1 Creating a new diagram sxcscccssscocctsccsssacesecsecesciescedesanesetcaceswees dauedeescaSaeedndadeseuasaesveeedenateeseeysantadecatenaceactecs 6 dao DOWN e E Giectnnan ina dionctumetiaeuacs hoewanenuennasonunsmatodd 7 4 3 Creating Classes cccccccssescccccceeseeeeeceaeeceeecaeaueeeeesaauseceeecsaueceeessauaec
13. MD PA then creates and loads the new project E Load Project Parsing UML_S5tandard_Profile xml Cancel The MD PA main screen is divided into four main sections 1 Along the top are the menus and a button tool bar 2 The Project pane appears on the top left hand side 3 Properties pane appears in a small window below it 4 The right hand a Dy MagicDraw UML Personal Edition 12 1 travel agency mdzip C uml travel agency travel ag ency Oj x File Edit View Layout Diagrams Options Tools Analyze Window Help DB HRBBBA s 2 B 1C um gencyitravel agency mdzip w a Contai laf Inherit 8 Diagrams lt gt Model E x 7 ee ee B5 side of the SCISEN Containment d g x Menu bar the diagram pane Button Tool bar B sa ee o Project pane with 4 tabs Is reserved to The most important is the E Data display open co UML Standard Profile UML_Standard_Profile xml Diagrams one diagrams and All of the details for a particular project including diagram details are stored in a database which is often also called an Encyclopedia or Data Dictionary LS Zoom E Documentation f Properties Zoom d Q x robin organplayers co uk D web_sites_mine HIcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 5 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw 4 1 Creating a new diagram There
14. an dogs boolean cost String property _id The relationship between ERD s and UML Class diagrams is best shown by comparing the two Looking above there are two diagrams the right hand one uses ERD symbols for the various relations whereas the equivalent UML diagram makes use of UML equivalent symbols for the associations lf you do not understand any of the above please refer to section 11 at http www robin beaumont co uk virtualclassroom contents html Exercise 1 UML Association Multiplicity The multiplicity value of association end A O zero and only zero 1 one and only one 0 1 zero or one 0 from zero to any positive integer 1 from one to any positive integer any positive integer Simple uml Association multiplicity symbols given above equate to the Cows feet notation used in ERD relationships Complete the following table to show the various equivalent notations robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 3 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw 3 1 Differences between UML Class diagrams and ERD s It is important to realise that UML class diagrams offer far more options Semantic richness than ERD s and also do not follow some of the conventions of ERDs ERD entity attributes conventions e Indicate which attributes are Key fields and often include a Unique i
15. azine gt MagicDraw UserManualid ZoneAlarm E Readme Nero gt 2 Uninstall MagicDraw UML Windows Media Bonus Pack for Windows XP ay Start ZoneA Adobe The magic draw screen will appear After which you may be asked to check or download various updates please select no Many of the updates you are offered are not appropriate for the academic version and you will just waste time attempting to install them 17 0 robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 4 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw 4 Creating and editing a new Project Before you can do anything in MD PA you need to either create a new project or open an existing one We will create a new project which will model the above scenario We will initially concentrate on the two classes Travel agent and Reservation To create the new project Choose the menu option File gt New Project Then Give the new blank project the name Travel agency and select a sensible project location typed C uml travel agency and clicked the option Create directory for project Aq MagicDraw UML Personal Edition 16 0 gt File Edt View Layout Diagrams Options Tool Dd New Project OSBBAA s e 7T Blank Project E Project From Template OK Cancel Manage Projects amp Create New Project a Open Project Recent Projects
16. b_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 12 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw Similarly we know that a particular reservation is only associated with one reservation po ol N F agentid String agent_name String nbhinn Otrin l a a a are ssociation lt gt 0 e gt History i 27 Association tr 4ssociation travel agent reservation iaka eE Documentation Hyperlinks A E iati BE Ho BNR Association Ends 4 Template Parameters E Association B Conveyved Information e E5 Inner Elements Saner 4 Relations E Tags visibility B Constraints El Association End A Mame Mavigable Multiplicity Type oe Default Value Changes to multiplicities Vicibilt reflected in the diagram i El Association End B Mame Navigable Multiplicity Type Default Value P Fa F _ i Fit i atid n j 4 2 2 a E M And the final result code String reservation _date date room type String Exercise 5 Please carry out what have described above Also remember to robin organplayers co uk cede Siring EE E a wel agent reservation Y Nisibilit e n S i T y D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx reservation ods as mdha n l Properties Standard SE
17. cDraw UML Personal Edition 12 1 welcome mdzip C Program Files MagicDraw UML samples File Edit View Layout Diagrams Options Tools Analyze Window Help c Pr UMLisamples welcome m v DEEL N 9 e P Fe Conta a Inheri E Diagr lt gt Model Containment of x amp Bj Es be E Common E Data se a Intro H E Tips and Tricks H E UML Extensions Ea UML Standard Profile UML_Standard_Profile xm Whats New in 12 0 fa Image Shape E Whats New in 12 1 H E Free Form Elements Profile Free_Form_Element Separator y BCA Matrix Templates Profile Matrix_Templates_Prof a Class Diagram ess mart Networking Profile Networking_Profile mdzip Class ra alas bi UML para interface E xtensions Profile i E Package Ca UML Web Extensions Profile UML_Web_Extensic J Generalization JS association Aggregation o Composition Note hd abc Text Box E Anchor 7 Dependency 4 gt P Interface Reali z a Usage amp Zoom E Documentation E Properties SP Abstraction properties ae E Instance Symbol Link sj a og Standard x m S Ge Information Flows v El Text Box Autosize Wrap Words HTML Text 7 false IV true V true Description 9 Messages Window E 2 Yo da Rol a Hh IS Es ae GE Hp E EA MagicDraw Resources Online Demo View online demo for MagicDraw features Download MagicDraw resource
18. dentifier ID field e Display Foreign key fields attributes which are often added by the modeller or automatically by ERD drawing software with the FK_ prefix In contrast in UML class diagrams e You do not indicate which are key fields attributes and do NOT include a unique identifier field for each instance which is called an OID Object Identifier as this attribute is assumed to exit e You do not indicate foreign Keys the concept does not exist in uml but can use a related concept called a qualifier avoid this These are important differences to keep in mind when moving from ERD to UML class diagrams For this tutorial we will be accepting the ERD conventions In other words forcing a UML class diagram to work like an ERD 3 2 Starting Up MD PA It is assumed that you have MD PA installed See appendix 1 concerning installing MD In this section the basic techniques for starting up the MD PA will be described MD PA is a Windows software application that runs within the Microsoft XP operating system As with most Windows applications starting SA SE is simply a matter of clicking the left mouse button on the Windows Start menu as shown here Start the program by going to Start start menu selecting All Programs then MagicDraw UML then MagicDraw UML by clicking on it as shown below E Audacity ge EQS 6 1 for Wir Gigabyte F GMT Tr 2 F F MagicdDraw UML Ad Magicdraw UML FR BBC Music Mag
19. e second class travel_age nt agent id late agent_name String We can now specify the multiplicities for each end travel _ agent agent id String agent name String agency phone String Ay Associa ton gt oor a Inner Elements Relations E oe Page ossociation travel_ agent reservatio FE Documentation Hyperlinks FES Association Ends Template Parameters Conveyed Information cde String reservation spde string reservation date date agency_phone String room type String El resem ation date date room type String 1 Double click on the association line to bring BP oe w ce oh ae Bee E Association Mame OWNer Visibility E Association End A Each of these sections refers to one end of the association We know that a Travel agent is associated with Zero or more reservations Change the multiplicity to 0_ Mame Navigable Multiplicity Type Default Value visibility E Association End B Mame Navigable up the association dialogue box History i 2 4ssocaconprareragent Te a me AA a n me Y oL Properties Standard ot Customize Data public J true 0 O 1 Bae r _ Pn y i Sto F J i a i _ F ai F ss a as woth oma iin 4 z a i men ml E ne Od ee a i a a tee B ae P 1 F a k a robin organplayers co uk a es D we
20. eessuaaeceeessaaeeeeesauaaeeeesssaageeesessaaess 8 AA Editing and Adding Attributes iia ceiccccssnaeccssactuacenstaenstaarceddaecndnadanandcndassknendeseadsnedeekduuddnaxdeadasdnereddeusesneceeeas 9 4 5 Defining a Relationship among the Classes ccccccccececseeeeeeeeeaeeeeeeeeeaeeseeeeeeseaseeeeeseeaeeeeeesaaeseeeeeeas 11 40 CGompeung Ne 126 216 2 0 Renee ene een cert Pasar E een re eee E een eee 14 CGS CE CFG SC ar a E 14 CSP Ticks and TIDS essere arcs estes sosiaxsiosnetiaveccusewatvexedeneyaxctousienwagexcueuetavcecusevaecusdeuseersew 15 6 1 Copying a diagram on the fly to a Word document or other SOftWALE cccceeceseeeeeeeeeaeeeeeeeesaeeeeeess 15 6 2 Saving a diagram as a PICU soa scccosestinesicuasigendatacoeatobesinnedesacesadaumadecueherlend dausinddndebodsadgaunadentieubaesateuesocnes 15 Gigs ENO DIA a a A E E inate etasavens psec besiannntinean 16 6 4 Adding Documentation to a Diagram ccccccseeeeceecceeeseceeeceeeseeeeeeseeseeeeeeseseeeeessseaseeeeessegeeeeeessaaeeeess 17 7 Conclusions for this TUtOrial cccccccccsscccesceceseececeseceteuceceueeseeeceueeseueessueeseneesanees 17 8 Appena Installing MAGIC FAW ss siccctescitsaviteansiaxiteaanacieausenitatenasiaeiteansteercteasiuneiuersearseavabadaes 18 Video of this tutorial You can see this tutorial as the second and third youtube videos at http www youtube com playlist list PL5D590974B7967000 Introduction to ERD mode
21. inished the first tutorial However there are some very important administrative tasks within MD you need to learn now 5 Extended Exercise To give you more practice try the following scenario A hotel has a single reception receptionists or reservation forms which can be considered to be a type of input via the reception for the diary The Diary A reservations Reservation F 7 The reception makes use of a reception diary l cea single Diary but the Diary is D maintained by numerous i SS SS Eee iS cn relates to a single Diary and also a single customer Customers 0 make reservation s Customers can be of two types either 0 vacationers or OO E OO Business_traveler Once a customer who has made a reservation actualy takes up residence they become a Hotel_guest One reservation may result in zero or more Hotel_guest s but a Hotel_guest always relates to a single reservation Each Hotel Guest owns zero or more Vehicles A room can be booked by zero or more Hotel_guests who can book one or more rooms Above is an incomplete solution three entities classes are missing have also made use of a special type of relation association called generalisation in two places you can find out about them in MG help or wait until you have worked through the introduction to UML section 11 4 at http www robin beaumont co uk virtualclassroom contents himl or just use ordinary relation associations for no
22. le applications and windows dialog boxes and so on e Preferably some experience with using a Database Management System such as Access Oracle or Base in OpenOffice Libreoffice although this is not assumed in this tutorial If you feel that you are unable to answer yes to any of the above criteria a good starting point is to work through is my Database systems modelling course or which this is part see section 8 at www robin beaumont co uk virtualclassroom contents htm In 2009 Magicdraw developed a plugin that allows the drawing of Crows feet notation in class diagrams however this is not available for the personal edition if you do have access to this plugin would recommend you try it out for this tutorial 1 4 What are the aims of this tutorial This tutorial is the first in a series to introduce you to using a specific CASE tool MagicDraw Personal Edition MD PA Because this is the first tutorial it provides you with screen by screen details of what to do The aim being to familiarise you with the most common basic features of MD PA By the end of this tutorial you will feel confident with navigating around MD PA and with the basics of drawing Class diagrams Subsequent tutorials assume you have this knowledge and therefore provide less detailed instructions While the complete CASE tool has hundreds of features capable of addressing the complete systems development life cycle this practical chapter will focus only on a small
23. lling using UML Class diagrams with MagicDraw 1 Introduction 1 1 Acknowledgement The original version of this handout was designed for a similar piece of software System Architect and was developed by Dorothy Dologite and Richarda Holowczak at City University of New York http cisnet baruch cuny edu holowczak classes 9490 satutorial but unfortunately since SA have been taken over by Telelogic there is no longer an educational version of the software Luckily over the last few years a number of alternative Case tools have become available the two most important being MagicDraw and Visual Paradigm 1 2 Where to obtain the software This depends on who you are e Students at The Royal College of Surgeons Edin will be provided with a academic licence which allows you to use the personal edition By default you need to download the actual software from the magicdraw site see below e All others can obtain the software by visiting and registering at htto Wwww magicdraw com for the free community edition An alternative with a similar interface is Visual Paradigm VP UML 1 3 Before you begin this tutorial Before you work through this tutorial you should have the following Knowledge and skills e A basic understanding of systems development life cycles e Anunderstanding of the basic terminology used in Entity Relationship Diagrams e A working knowledge of Microsoft Windows Apple environments including working with multip
24. n drawing Edit View Layout Diagrams Options Tools Exercise 2 CT New Project Please carry out what have described above FS Open Project pS Elose Project i Close All Projects Use Module Remember to always Save as Image Save your project robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 6 of 19 4 2 Drawing v mdzip Cum travel agency travel agency Introduction to ERD modelling using UML Class diagrams with MagicDraw Analyze Window Help gencyitravel agency mdzip oe OE ta Ey E 7 The selection tool l Es travel agency i Text Box E Anchor 0 Dependency E Image Shape Separator Class Diagram al 4 Generalization af Association a ggregation Composition a Interface Reali A u Usage 4 Ky al 2a Abstraction oO Instance Tish eae cg Information Flows 4 Removing the grid from the drawing canvas The grid is my pet annoyance To remove it To create a new Association click here Specification 1 Right mouse click ee SSS anywhere ina empty Symbol s Properties Alt Enter part of the canvass to bring up this menu Shift Enter Diagram Properties Show Diagram Frame Show Diagram Info Show Owner Goa To Select in Containment Tree Alt E 2 You may need to click on a down arrow
25. ns gt Perspectives gt Perspectives T MagicDraw Startup Select predefined MagicDraw configuration according listed Perspectives Business Analyst Description Software Architect Current Perspective provides features requirements and modeling the system Analysis Features are highlighted Configuration is modeling oriented Code engineering transformations and other features are hidden System Analyst 7 Expert Leave Expert check box not selected For simplified interface Most popular items and features will be suggested robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 18 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw lf when presented with either of the following two dialogue boxes click Cancel H Auto ch eck for Updates ox The Following resources are needed and were not found Custom diagram Content Diagram Custom diagram Web Diagram Custom diagram Networking Diagram Custom diagram Free Form Diagram We highly recommend to launch Resource Plugin Manager and download the missing resources Without these resources project will not be fully loaded MagicDraw is about to check For updates J Show this tip next time Launch Resource Plugin Manager The first screen should then appear take some time to read through the information about MagicDraw resources Dy Magi
26. nted assignments Video of this This is discussed further on youtube at http Awww youtube com theoldorganplayer robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 15 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw 6 3 Linking Diagrams Suppose that you have a complex class diagram and have realized that a number of classes are basically an expansion of one particular class for example in our diagram the Class Property could be associated with a number of classes such as Customer Staff Bill etc It is possible to link the two together on two separate diagrams listory E property 1 Select the class you wish to attach property the child diagram to e g property class i m me ot a oa Properties Expert amp Customize i O Class Mame property 2 Bring up the specication dialogue Qualified Name ee box and Ap ana Data property and click on the pplied Stereotype Base Classifi a ea Vater 3 Insert hyperlinik dialogue box Eqized IME ace M appears ee pub 4 select the Element Symbol tab a Is Leaf 5 click on Ts Active Is 4bstract Active Hyperlink To Do Ad Insert Hyperlink Hyperlink Text to display The select model element dialogue box appears 6 have created another class symbol File p remowe the hwperink web Page diagram which contains mE Element Symbol
27. pes of Smart Manipulators 1 Small buttons are displayed within the symbol on the diagram pane SUPPress Insert Neve Attributes N Attribute Suppress aaa snet New Pe delivers gt m Customer Shipment g 1 9 Or P a Operations Class A F Ng C rarere Operation Suppress x N Set Preferred Structure aii Size Reset label position 2 Smart Manipulator toolbar which appears when elements are selected on the diagram pane Smart Manipulator Toolbar Expand Tool iii Taken fom Magicdraw user manual ver12 1 page 4 141 robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 8 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw Adding names to classes 6 lithesucpP izre esae E Common 5 Note H abe Text Box gt Anchor A Dependency Image Shape ou can easily add names to classes by clicking See arator on the top compartment and typing it it e Class Diagram Class 3 Interface B Package A Generalization s Association ef Aggregation Composition of Interface Reali iu Usage 2 abstraction 4 4 Editing and Adding Attributes Click on the bubble and type in the name repeat as necessary 1 Click on the class you wish to add the attributes to 2 Select the Insert new attributes bubble a K k P 2 do f agent_id agent name agency
28. phone TUANA To add edit attributes simply select the class then click on the relevant bubble Data Type In this example have added 3 attributes to the Travel Agent entity Agent id Also notice that have specified what type of attribute each is If you have worked with databases you will be aware that data is classified into a number of types the five basic divisions are Agency_phone string String or Char characters you may also specify how many characters are probably required Numbers Integers and real numbers Boolean This type of data is where it can only take one of two values such as Yes no or open closed etc Binary Media such as pictures audio and movie files Date Time We will now edit the above attributes to specify exactly what type each is robin organplayers co uk D web_sites_mine HIcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 9 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw Specifying attribute types 1 Select the class travel_age nt agent_id Diagram Properties Shift Enter 2 Right mouse click to bring up the menu with the agent_ name Pane a specification option agency phone Show Diagram Frame 3 Select Attributes then open up the branch to show O the attribute names Show Diagram Info p7 Class travel_agent B cle O travel_ agent FES Documentatigingeifrerlinks EES Att
29. ributes a EE E E Property 3 0 agentid C 2020 shone H agent_name History Se agent ti agency phone 4 You can change the number of properties shown for each attribute You should not need to change l F et g4 Be BE Properties Standard Standard 4 Expert All this E Ports is B Operations Visibility private D Behan Default Value Template Parameters Owner E travel_agent ven Inner Elements Applied Stereotype see Relations Multiplicity a Tags To Do iS Constraints g N F Fan ai Pa ae i am A w aii i Cona meetin a Pate Me ag ae se a ae P g ge Pas 5 ma The picture below shows you how to set the attribute agency_phone to type string Ad Class travel_agent e a x History 2 travel agent Y agency phone E o e gt O travel_agent El Documentation Hyperlinks G E Attributes agency phone agentid agent _name Z Ports be Operations Behaviors ee Template Parameters z Inner Elements pan gli of e FrOperies atandard agency phone El Property Name Type lt UNSPECIFIED gt Visibility Ca short UML 3 Default Value andard Profile Mag OWDEF Applied Stereotype JE i e Relations Multiplicity subsystem Component HKL Ste piste Tags To Do N TE eb ao biel lal oe Tier eeki
30. rojects 1 C Pr UML samplestwelcome mdzip EFA RUP Extensions Profile E P DIM heh Fekenciona Profile MIM Weh Feebencir Page 19 of 19
31. s You may download SysML plugin Plugin includes SysML profile all SysML diagrams System engineer user perspective with customized user interface specification windows and SysML usability features DoDAF plugin profile diagrams and sample Includes DoDAF mapping to UML The mapping was created in accordance with recomendations in DoDAF specifications Zachman Framework sample This is sample file that show how Magic Draw may be used for Zachman Framework implementation UML 1 4 metamodel This is sample file that shows UML 1 4 metamodel structure UML 2 0 metamodel This is sample file that shows UML 2 0 metamodel structure MFC template The template contains classes and various interfaces reversed from MFC include files like CWinApp For more resources look in the Resources dialog choose command Options Resources from main menu and check for available resources for MagicDraw N New resources may be added any time so do not forget to check for available resources regulary MagicDraw samples MagicDraw samples are located in MagicDraw installation directory samples folder Case studies MagicLibrary The model presented in this case study illustrates how various kinds of UML diagrams may be used for modeling and developing a library management system Itis also a sample of using modules in a project Case study includes generated reports Inventory Control System The sample is taken from UML Weekend Crash Course by Thomas A
32. w robin organplayers co uk D web_sites_mine Hlcourseweb new chap11 case_tool_tuts magicdraw erd1_2007_new docx Page 14 of 19 Introduction to ERD modelling using UML Class diagrams with MagicDraw 6 Useful Tricks and Tips 6 1 Copying a diagram on the fly to a Word document or other software Ad MagicDraw UML Personal Edition 12 1 autosave md File View Layout Diagrams Options Tools Dp a Undo Ctrl z sm Redo i Diagral Ct 4 To copy the diagram on the fly just go E s ion Edi pa EMF fil ieni tion Edit gt copy as EMP file C A Paste menu option Edit gt copy as EMF tle Ai l z Paste with New Data Jthen paste it into Microsoft Word using x wy Delete A Ct V NE fe Delete Symbol s a Select All Ctr 7 j Select All of the Same Tygite Ctrl Alk 5 ef Copy as EMF Image Ctrl 5hift E y Copy as IPG Image Chrl ShiFt J b Find Ctrl F f E ae van PAB aer SOOT a Eh a g 6 2 Saving a diagram as a picture 1 Select Save as image from the File menu By MagicDraw UML Personal Edition 12 1 autosave md Exercise 7 File Edit View Layout Diagrams Options Tools New Project Copy your diagram into a word eo OR D B amp 7 Open Project Save Project Close Project Close All Projects Use Module Selected diagrarr Print Preview Not empty diagrams Opened Projects Name My Re ent Doct nents

Download Pdf Manuals

image

Related Search

Related Contents

Page 1 Page 2 Page 3 `Pick ups ーnterview 失恋ソングの女王 しばた  MANUAL DE INSTALAÇÃO E DO USUÁRIO  Indesit 3D AA NX  Manual Instalacion  Insecticide Rampants - CRC Industries Europe  Manual  burrow oat bait    NI WSN-3214 User Guide and Specifications  NEC照明器具  

Copyright © All rights reserved.
Failed to retrieve file