given a student table with a multi-valued attribute namefristname middlenameand lastname。define transformation rule2。thenexplan how to convert those attributes to relational tables用中文回答
转换规则2:将多值属性name拆分成单独的属性firstname、middlename和lastname。
将该学生表中的每个记录拆分成三个记录,每个记录仅包含一个名字属性,如下所示:
| student_id | firstname | middlename | lastname | |------------|-----------|------------|----------| | 1 | John | A | Smith | | 2 | Jane | B | Doe | | 3 | Bob | C | Johnson |
其中,每个记录的student_id属性都相同,表示它们属于同一个学生。这些记录可以通过student_id属性进行关联。
这样,就将多值属性name拆分成了单独的属性,并将其转换为了关系型表格。
原文地址: https://www.cveoy.top/t/topic/eYq5 著作权归作者所有。请勿转载和采集!