How to do Inheritance Modeling in Relational Databases?(如何在关系数据库中进行继承建模?)
问题描述
我的问题是关于关系数据库系统中的继承建模.我有规范的数据模型,并且我有一些与从产品表继承某些属性的产品定价相关的字段,我想在 MySQL 关系数据库中对这种继承进行建模,因此,
我们如何在关系数据库中进行继承建模?"
谢谢.
Martin Fowler 在他的《企业应用程序架构模式》一书中广泛讨论了这个问题.获取这本书并查看:
该网站应该会给您一些想法.您可能还想阅读有关继承映射器 的部分.每种不同的方法都有其优点和缺点,因此请明智地选择.
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:
- Single Table Inheritance
- Class Table Inheritance
- 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.
这篇关于如何在关系数据库中进行继承建模?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在关系数据库中进行继承建模?


基础教程推荐
- 在多列上分布任意行 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- oracle区分大小写的原因? 2021-01-01