[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-656098-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-656098-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","tutorial-class-diagrams-and-entity-relationship-diagrams-erd","Tutorial - Class Diagrams and Entity Relationship Diagrams (ERD)","","Practice-focused guidance for modeling a system using class diagrams and entity relationship diagrams (ERD). Explains how class diagrams capture structural and behavioural aspects, while ERDs focus on structural relationships to provide a static system view. Covers core elements—classes, associations (binary, n-ary, aggregation, composition, generalization, dependency, realization, association classes), attributes, and operations—and then outlines a step-by-step workflow to identify classes and associations, draw initial diagrams, set multiplicity/cardinality, define primary keys, and refine the results.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/tutorial-class-diagrams-and-entity-relationship-diagrams-erd/656098/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/tutorial-class-diagrams-and-entity-relationship-diagrams-erd/656098.png","ImageObject",300,407,{"name":42,"@type":43},"fresh2021","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-31","2026-10-25",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",5,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is the difference between a class diagram and an ERD?","Question",{"text":63,"@type":64},"A class diagram models both structural and behavioural features of a system. An ERD depicts only structural features, providing a static view of the system.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Which association types are covered in class diagrams?",{"text":68,"@type":64},"The tutorial covers binary and n-ary associations, as well as aggregation, composition, generalization, dependency, realization, and association classes.",{"name":70,"@type":61,"acceptedAnswer":71},"What are the main steps to create a class diagram?",{"text":72,"@type":64},"Identify classes, find associations, draw a rough diagram, fill in multiplicity, identify attributes, identify behaviours, then review the diagram to fix inconsistencies and ensure completeness.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},656098,1793051299,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":55,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":145},962093912154,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","Practice Example  \nThe University of Toronto has several departments. Each department is managed by a chair, and at least one professor. Professors must be assigned to one, but possibly more departments. At least one professor teaches each course, but a professor may be on sabbatical and not teach any course. Each course maybe taught more than once by different professors. We know of the department name, the professor name, the professor employee id, the course names, the course schedule, the term/year that the course is taught, the departments the professor is assigned to, the department that offers the course.  \n1 Class Diagrams and Entity Relationship Diagrams (ERD)  \nClass diagrams and ERDs both model the structure of a system. Class diagrams represent the dynamic aspects of a system: both the structural and behavioural features. ERDs, depicting only structural features provide a static view of the system.  \n2 Class Diagrams  \n2.1 Elements ofa class diagram:  \n2.1.1 class  \n\n| Class Name |\n| --- |\n|  |\n|  |\n\nA class is a general concept (represented as a square box) . A class defines the structural attributes and behavioural characteristics of that concept. Shown as a rectangle labeled with the class name.  \n2.1.2 association  \n\n| Class 1 | Association | Class 2 |\n| --- | --- | --- |\n|  |  |  |\n|  |  |  |\n|  |  |  |\n\nA (semantic) relationship between classes. A line that joins two classes.  \n2.1.2.1 binary  \n\n| Person | Eats  | Food |\n| --- | --- | --- |\n|  |  |  |\n|  |  |  |\n|  |  |  |\n\nSimple association between two classes. A solid triangle with the association name indicates the direction in which the association is meant to be read.  \n2.1.2.2 n-ary  \n\n| Class 1 |\n| --- |\n|  |\n|  |\n\n| Class 2 |\n| --- |\n|  |\n|  |\n\nn-ary Association expresses an association between multiple classes  \n\n| Class 3 |\n| --- |\n|  |\n|  |\n\n2.1.2.3 Aggregation  \n\n| Team |\n| --- |\n|  |\n|  |\n\n| Member |\n| --- |\n|  |\n|  |\n\n“has-a” relationship  \n2.1.2.4 Composition  \n\n| Car |\n| --- |\n|  |\n|  |\n\n| Engine |\n| --- |\n|  |\n|  |\n\n2.1.2.5 Generalization  \n\n| Car |\n| --- |\n|  |\n|  |\n\n| Volvo |\n| --- |\n|  |\n|  |\n\n2.1.2.6 Dependency  \n\n| Project Manager |\n| --- |\n|  |\n|  |\n\n| Project |\n| --- |\n|  |\n|  |\n\n| Team |\n| --- |\n|  |\n|  |\n\n“is-composed-of” relationship  \n“is-a-kind-of” relationship  \nThe source class depends on (uses) the target class. (not used for requirements analysis)  \n2.1.2.7 Realization  \n\n| «datatype»\u003Cbr>Human Resources |\n| --- |\n|  |\n|  |\n\n| «datatype»\u003Cbr>Project Manager |\n| --- |\n|  |\n|  |\n\n| | Worker |\n| --- | --- |\n|  |  |\n|  |  |\n|  |  |\n| |  |\n\n\n| «datatype»\u003Cbr>System Administrator |\n| --- |\n|  |\n|  |\n\nClass supports all operations of target class but not all attributes or associations.(not used for requirements analysis)  \n2.1.2.8 Association Classes  \n\n| class 2 |\n| --- |\n|  |\n|  |\n\n\n| class 1 |\n| --- |\n|  |\n|  |\n\nAssociation Class  \nCan be applied to binary or n-ary associations. Used to capture the attributes of an association.  \n2.1.3 attribute  \n\n| class 1 |\n| --- |\n| -attribute 1\u003Cbr>-attribute 2\u003Cbr>-attribute 3 |\n|  |\n\n2.1.4 operation  \n\n| class 1 |\n| --- |\n| -attribute 1\u003Cbr>-attribute 2\u003Cbr>-attribute 3 |\n| +operation 1()\u003Cbr>+operation 2()\u003Cbr>+operation 3() |\n\nWhat is known about each object of this class type. Typical characteristics.  \nWhat objects of this class type do. Typical actions that are relevant to the current analysis.  \n3 Creating a Class Diagram  \nHere are some steps to help create a class diagram:  \n3.1 Identify Classes  \nThese are the abstract or physical “things” in our system which we wish to describe. Find all the nouns and noun phrases in the domain descriptions you have obtained through your analysis. Consider these class candidates.  \n3.2 Find Associations  \nNow find the verbs that join the nouns. e.g., The professor (noun) teaches (verb) students (noun) . The verb in this case, defines an association between the two nouns. Identify the type of association. Use a matrix to define the associations between cla","cbCaii9syOVECp9A","https://ap.wps.com/l/cbCaii9syOVECp9A","pdf",92093,15,"English","# Class Diagrams and Entity Relationship Diagrams (ERD)\n## Class Diagrams\n### Elements of a class diagram\n#### class\n#### association\n#### attribute\n#### operation\n## Creating a Class Diagram\n## Entity Relationship Diagrams\n### Elements of Entity Relationship Diagrams\n### Creating an ERD","[{\"question\":\"What is the difference between a class diagram and an ERD?\",\"answer\":\"A class diagram models both structural and behavioural features of a system. An ERD depicts only structural features, providing a static view of the system.\"},{\"question\":\"Which association types are covered in class diagrams?\",\"answer\":\"The tutorial covers binary and n-ary associations, as well as aggregation, composition, generalization, dependency, realization, and association classes.\"},{\"question\":\"What are the main steps to create a class diagram?\",\"answer\":\"Identify classes, find associations, draw a rough diagram, fill in multiplicity, identify attributes, identify behaviours, then review the diagram to fix inconsistencies and ensure completeness.\"}]","Tutorial - Class Diagrams and Entity Relationship Diagrams (ERD) | PDF",1792966309,38]