[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-656016-105":59,"doc-detail-656016-en":130,"doc-similar-656016":161},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","converting-er-diagrams-to-tables-lecture-notes-relationship-to-table-conversion","Converting ER Diagrams to Tables - Lecture Notes - Relationship-to-Table Conversion","","Converting ER diagrams into relational tables by mapping entity and relationship sets to tables with appropriate attributes and candidate keys. Starting from the premise that an ER diagram supports concise design capture and can be transformed into a relational schema, the lecture focuses on the second step: turning each entity/relationship set into relational structures. For entity sets, it preserves attributes and the candidate key. For relationships, it derives table attributes from participant keys and relationship attributes, then determines the candidate key using cardinality constraints: many-to-many, one-to-many, one-to-one, and multi-way.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/converting-er-diagrams-to-tables-lecture-notes-relationship-to-table-conversion/656016/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/converting-er-diagrams-to-tables-lecture-notes-relationship-to-table-conversion/656016.png","ImageObject",300,407,{"name":92,"@type":93},"Elsa","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-25","2026-10-25",true,{"@type":102,"interactionType":103,"userInteractionCount":34},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"How are entity sets converted into tables?","Question",{"text":112,"@type":113},"For an entity set, create a table with the same attributes and the same candidate key.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"In a many-to-many relationship, how is the candidate key determined?",{"text":117,"@type":113},"The candidate key includes all attributes in the candidate keys of both participating entity sets.",{"name":119,"@type":110,"acceptedAnswer":120},"How does the conversion differ for one-to-many and one-to-one relationships?",{"text":121,"@type":113},"For one-to-many, the candidate key of the relationship table matches the candidate key of the entity set on the many side. For one-to-one, the relationship has two candidate keys: one corresponding to each participating entity set.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},656016,1793052231,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":34,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":41,"preview_page_count":19,"preview_urls":145},137455077381,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","Converting ER Diagrams to Tables  \nYufei Tao  \nDepartment of Computer Science and Engineering Chinese University of Hong Kong  \nConverting ER Diagrams to Tables  \nAn ER diagram is a pictorial representation of the information that can be captured by a database. Such a \\picture\" serves two purposes:  \n It allows database professionals to describe an overall design concisely yet accurately.  \n (Most of) it can be easily transformed into the relational schema.  \nThis lecture will talk about the second bullet.  \nConverting ER Diagrams to Tables  \nRecall that an ER diagram consists of:  Entity sets.  \n Relationship sets.  \nWe will convert each entity/relationship set to a table, which involves deciding the table's  \n attributes  \n and candidate key.  \nConverting ER Diagrams to Tables  \nGiven an entity set, create a table with the same attributes and candidate key.  \nExample:  \nPROF (pid, hkid, dept, rank, salary) where pid is set as a candidate key.  \nConverting ER Diagrams to Tables  \nLet us 􀀌rst consider binary relationship sets. To convert R as shown below  \nwe create a table whose attributes include:  the candidate keys of both A and B  the attributes of R (if any) .  \nThe candidate key of the table, however, depends on the cardinality constraint of R. See the next few slides.  \nConverting ER Diagrams to Tables  \nMany-to-many: The candidate key of R includes all the attributes in the candidate keys of A and B .  \nExample:  \n. . .  \nTAKE (sid, cid, year, grade)  \nwhere the candidate key is (sid, cid, year) .  \nConverting ER Diagrams to Tables  \nRelationship Set ) Table  \nOne-to-many: The candidate key of R is the same as B (i.e. , the entity set on the \\many\" side) .  \nExample:  \nPROF  \nTEACH ~~ ~~ CLASS  \ncid  \nyear  \npid  \n. . .  \n. . .  \nTEACH (pid, cid, year)  \nwhere the candidate key is (cid, year) .  \nThink  \nWhy?  \nConverting ER Diagrams to Tables  \nRelationship Set ) Table  \nOne-to-one: R has two candidate keys. The 􀀌rst (second) one is the same as A (B) .  \nExample:  \nMAN  \nMARRY WOMAN  \nwid  \n. . .  \nmid  \n. . .  \nyear  \nMARRY (mid, wid, year)  \nwhere a candidate key is mid, and another is wid.  \nThink  \nWhy?  \nConverting ER Diagrams to Tables  \nMulti-way relationship set R: Create a table that includes  the candidate keys of the participating entity sets  the attributes of R (if any) .  \nThe candidate key of the table includes all the attributes of the candidate keys of the participating entity sets.  \nConverting ER Diagrams to Tables","cbCaidjB9TbBjARy","https://ap.wps.com/l/cbCaidjB9TbBjARy","pdf",170842,12,"English","# Converting ER Diagrams to Tables\n## Mapping Entity Sets to Tables\n## Converting Binary Relationship Sets\n### Many-to-Many\n### One-to-Many\n### One-to-One\n### Multi-Way Relationships","[{\"question\":\"How are entity sets converted into tables?\",\"answer\":\"For an entity set, create a table with the same attributes and the same candidate key.\"},{\"question\":\"In a many-to-many relationship, how is the candidate key determined?\",\"answer\":\"The candidate key includes all attributes in the candidate keys of both participating entity sets.\"},{\"question\":\"How does the conversion differ for one-to-many and one-to-one relationships?\",\"answer\":\"For one-to-many, the candidate key of the relationship table matches the candidate key of the entity set on the many side. For one-to-one, the relationship has two candidate keys: one corresponding to each participating entity set.\"}]","Converting ER Diagrams to Tables - Lecture Notes - Relationship-to-Table Conversion | PDF",1792965688,[146,150,153,157],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/2ad5ce314ec0fdf50e1867c40f48cb1c.webp",983,736,{"page_no":14,"url":151,"width":152,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/62ccf73f3719bb2efe30f731fdc59dc5.webp",982,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/d9914c6931c9b73d5d36b4afe5982feb.webp",981,735,{"page_no":19,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/3406aaa0f2df4267a93adba1f6d70d96.webp",980,734,{"list":162,"token":66},[163,169,176,182,188,194,200,206,212,218],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":29,"category_name":30,"create_tm":168},655951,"Entity Relationship Diagram - Database Design and Constraints","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975294792/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=Xyj5ooWYAgsJHAuLJ0UHubVV2Lg%3D","entity-relationship-diagram-database-design-and-constraints",1792965071,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":174,"category_name":30,"create_tm":175},656122,"Translating Entity-Relationship to Relational Tables - Fall 2026 - David Toman","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974785418/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=V8p06NcnyAZZM5ojoLbQq1aIVBw%3D","translating-entity-relationship-to-relational-tables-fall-2026-david-toman",11,1792966526,{"doc_id":177,"doc_title":178,"file_type":137,"home_preview_img_url":179,"slug":180,"view_count":44,"category_name":30,"create_tm":181},656095,"Entity-Relationship Model - ERD Basics","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975300161/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=qN4yETMZf8YOB4%2BbOAhhs5s1haw%3D","entity-relationship-model-erd-basics",1792966306,{"doc_id":183,"doc_title":184,"file_type":137,"home_preview_img_url":185,"slug":186,"view_count":139,"category_name":30,"create_tm":187},656017,"ER Model & Relational Model - ER Model (Entity Relationship Model) - Overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975297787/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=zljBqB%2BOvukvlYTpu%2FDKIPhxETU%3D","er-model-relational-model-er-model-entity-relationship-model-overview",1792965690,{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":174,"category_name":30,"create_tm":193},656085,"Mapping ER Diagram to a Relational Database","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974784510/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=uDJZiaCemvBQATXO1YF3AygZlYg%3D","mapping-er-diagram-to-a-relational-database",1792966194,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":44,"category_name":30,"create_tm":199},656146,"DBMS UNIT III - Database Management Systems - Unit 3","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975301649/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=X3Egyb71JSsCVGUtK5MPM%2FpXC0Q%3D","dbms-unit-iii-database-management-systems-unit-3",1792966705,{"doc_id":201,"doc_title":202,"file_type":137,"home_preview_img_url":203,"slug":204,"view_count":24,"category_name":30,"create_tm":205},656021,"DBMS - ER Design Issues","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975297817/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=5YQ9mnoaUDYChMU2uh62coFbnlo%3D","dbms-er-design-issues",1792965697,{"doc_id":207,"doc_title":208,"file_type":137,"home_preview_img_url":209,"slug":210,"view_count":34,"category_name":30,"create_tm":211},655995,"Lecture Notes - Database Design and ER Model","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975296866/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=kKihCPKhr8gkwmcwpUuDlRKzB80%3D","lecture-notes-database-design-and-er-model",1792965449,{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":34,"category_name":30,"create_tm":217},655985,"Entity-Relationship Diagrams - Lecture 3 - Database Design and ER Modeling","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975296460/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=fcgqHZoXpzlKOUfAbVDHGoNyvoc%3D","entity-relationship-diagrams-lecture-3-database-design-and-er-modeling",1792965344,{"doc_id":219,"doc_title":220,"file_type":137,"home_preview_img_url":221,"slug":222,"view_count":223,"category_name":30,"create_tm":224},656023,"Chapter 3 - Chapter 3 - Database Design Basics","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974782468/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=TmgPVmvLZLUVcy%2BlgLRCWQy6KTM%3D","chapter-3-chapter-3-database-design-basics",14,1792965701]