1. <small id='rp1fH'></small><noframes id='rp1fH'>

        <tfoot id='rp1fH'></tfoot>
        <legend id='rp1fH'><style id='rp1fH'><dir id='rp1fH'><q id='rp1fH'></q></dir></style></legend>

      2. <i id='rp1fH'><tr id='rp1fH'><dt id='rp1fH'><q id='rp1fH'><span id='rp1fH'><b id='rp1fH'><form id='rp1fH'><ins id='rp1fH'></ins><ul id='rp1fH'></ul><sub id='rp1fH'></sub></form><legend id='rp1fH'></legend><bdo id='rp1fH'><pre id='rp1fH'><center id='rp1fH'></center></pre></bdo></b><th id='rp1fH'></th></span></q></dt></tr></i><div id='rp1fH'><tfoot id='rp1fH'></tfoot><dl id='rp1fH'><fieldset id='rp1fH'></fieldset></dl></div>
          <bdo id='rp1fH'></bdo><ul id='rp1fH'></ul>

        子类型的表关系

        Table relationship for subtypes(子类型的表关系)

        <small id='bZGvw'></small><noframes id='bZGvw'>

        <legend id='bZGvw'><style id='bZGvw'><dir id='bZGvw'><q id='bZGvw'></q></dir></style></legend>
          <bdo id='bZGvw'></bdo><ul id='bZGvw'></ul>
            <tbody id='bZGvw'></tbody>

              • <i id='bZGvw'><tr id='bZGvw'><dt id='bZGvw'><q id='bZGvw'><span id='bZGvw'><b id='bZGvw'><form id='bZGvw'><ins id='bZGvw'></ins><ul id='bZGvw'></ul><sub id='bZGvw'></sub></form><legend id='bZGvw'></legend><bdo id='bZGvw'><pre id='bZGvw'><center id='bZGvw'></center></pre></bdo></b><th id='bZGvw'></th></span></q></dt></tr></i><div id='bZGvw'><tfoot id='bZGvw'></tfoot><dl id='bZGvw'><fieldset id='bZGvw'></fieldset></dl></div>

                  <tfoot id='bZGvw'></tfoot>
                1. 本文介绍了子类型的表关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个名为网站"的父表,其中包含有关网站的记录.我有一个名为SupportSystem"的子表,它保存有关不同类型支持系统(例如电子邮件、电话、票务、实时聊天等)的记录.有一个中间表Website_SupportSystem"以多对多关系连接这些表.

                  I have a parent table called 'Website' which holds records about websites. I have a child table called 'SupportSystem' which holds records about different types of support systems such as email, phone, ticketing, live chat etc. There is an intermediate table 'Website_SupportSystem' which joins these tables in a many-many relationship.

                  如果网站的 SupportSystem 是票务,我还想记录软件平台.例如WHMCS.我的直觉是创建一个名为 SupportPlatform 的新查找表,并将其与现有的连接表Website_SupportSystem"相关联,并将数据存储在那里.但是,SupportSystem 和 SupportPlatform 之间没有关系.如果我将它们联系起来,那么我最终会得到一个循环引用.

                  If the SupportSystem for a Website is ticketing, I also want to record the software platform .e.g. WHMCS. My instinct is to create a new lookup table called SupportPlatform and relate this to the existing join table 'Website_SupportSystem' and store the data there. However, then there is no relationship between the SupportSystem and SupportPlatform. If I relate those then I end up with a circular reference.

                  你能看出我做错了什么吗?对这些数据建模的最佳方法是什么?

                  Can you see what I am doing wrong? What would be the best way to model this data?

                  推荐答案

                  可以使用超类型/子类型关系,如图所示.

                  You could use super-type/subtype relationship, as shown in the diagram.

                  • SupportSystem 表包含所有支持系统通用的列.
                  • 电子邮件票务电话LiveChat表都有各自特定的列.
                  • 子类型表中的主键也是超类型表的外键.
                  • SupportSystem table contains columns common to all support systems.
                  • Email, Ticketing, Phone and LiveChat tables have columns specific to each one.
                  • Primary key in the subtype table is also a foreign key to the super-type table.

                  这篇关于子类型的表关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                  MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)
                  MySQL cumulative sum grouped by date(按日期分组的 MySQL 累计总和)
                  • <bdo id='81YbV'></bdo><ul id='81YbV'></ul>
                    1. <legend id='81YbV'><style id='81YbV'><dir id='81YbV'><q id='81YbV'></q></dir></style></legend>
                      <i id='81YbV'><tr id='81YbV'><dt id='81YbV'><q id='81YbV'><span id='81YbV'><b id='81YbV'><form id='81YbV'><ins id='81YbV'></ins><ul id='81YbV'></ul><sub id='81YbV'></sub></form><legend id='81YbV'></legend><bdo id='81YbV'><pre id='81YbV'><center id='81YbV'></center></pre></bdo></b><th id='81YbV'></th></span></q></dt></tr></i><div id='81YbV'><tfoot id='81YbV'></tfoot><dl id='81YbV'><fieldset id='81YbV'></fieldset></dl></div>

                        <small id='81YbV'></small><noframes id='81YbV'>

                          • <tfoot id='81YbV'></tfoot>
                              <tbody id='81YbV'></tbody>