如何在关系数据库中进行继承建模?

2023-05-01数据库问题
4

本文介绍了如何在关系数据库中进行继承建模?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我的问题是关于关系数据库系统中的继承建模.我有规范的数据模型,并且我有一些与从产品表继承某些属性的产品定价相关的字段,我想在 MySQL 关系数据库中对这种继承进行建模,因此,

我们如何在关系数据库中进行继承建模?"

谢谢.

解决方案

Martin Fowler 在他的《企业应用程序架构模式》一书中广泛讨论了这个问题.获取这本书并查看:

      1. 该网站应该会给您一些想法.您可能还想阅读有关继承映射器 的部分.每种不同的方法都有其优点和缺点,因此请明智地选择.

        My question is regarding Inheritance modeling in Relational Database Systems. I have canonical data model and in that I have some fields related to pricing of product inheriting certain attributes from product table and I want to model this inheritance in MySQL relational database and so,

        "How can we do Inheritance Modeling in Relational Databases ?"

        Thanks.

        解决方案

        Martin Fowler discusses this extensively in his book Patterns of Enterprise Application Architecture book. Get this book and look into:

        1. Single Table Inheritance

        1. Class Table Inheritance

        1. Concrete Table Inheritance

        The Website should give you some idea. You might also want to read the section on inheritance mappers. Each of the different approaches have their pros and cons so choose wisely.

        这篇关于如何在关系数据库中进行继承建模?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

        The End

相关推荐

Mysql目录里的ibtmp1文件过大造成磁盘占满的解决办法
ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致...
2025-01-02 数据库问题
151

SQL 子句“GROUP BY 1"是什么意思?意思是?
What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)...
2024-04-16 数据库问题
62

MySQL groupwise MAX() 返回意外结果
MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)...
2024-04-16 数据库问题
13

MySQL SELECT 按组最频繁
MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)...
2024-04-16 数据库问题
16

在 Group By 查询中包含缺失的月份
Include missing months in Group By query(在 Group By 查询中包含缺失的月份)...
2024-04-16 数据库问题
12

为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同
Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)...
2024-04-16 数据库问题
13