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>

        子类型的表关系

        时间:2024-04-16

        <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.

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

                  上一篇:创建分层定义的数据集的扁平表/视图 下一篇:对整个数据库使用共享列的主表是一种很好的做法吗?

                  相关文章

                  • <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'>

                    1. <tfoot id='81YbV'></tfoot>