关系数据库设计模式? [英] Relational Database Design Patterns?

查看:305
本文介绍了关系数据库设计模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设计模式通常与面向对象的设计相关。

是否有设计模式,用于创建和编程关系数据库 < br>
许多问题当然必须有可重用的解决方案。



示例将包括表设计,存储过程,触发器等的模式。



是否有类似于 martinfowler.com 的在线存储库? / p>




模式可以解决的问题示例:




  • 存储分层数据(例如具有1:1键和差异的类型vs多个表的单表...)

  • 使用可变结构存储数据(例如,通用列与xml对于分隔列...)

  • 非正式化数据(如何以最小的影响等)...


Martin Fowler的签名系列中有一本名为

noreferrer>重构数据库。这提供了重构数据库的技术列表。我不能说我听到过数据库模式的列表。



我也强烈建议David C. Hay的数据模型模式和跟进元数据地图建立在第一个,更加雄心勃勃,有趣。前言仅供参考。



Len Silverston的数据模型资源手册系列也是一个很好的地方,可以查找一些预先准备的数据库模型。第1卷包含普遍适用的数据模型(员工,帐户,运输,采购等),第2卷包含行业特定的数据模型(会计,医疗保健等),使用UML建模颜色提供了一个原型驱动的实体建模过程,从前提是有四个核心原型的任何对象/数据模型


Design patterns are usually related to object oriented design.
Are there design patterns for creating and programming relational databases?
Many problems surely must have reusable solutions.

Examples would include patterns for table design, stored procedures, triggers, etc...

Is there an online repository of such patterns, similar to martinfowler.com?


Examples of problems that patterns could solve:

  • Storing hierarchical data (e.g. single table with type vs multiple tables with 1:1 key and differences...)
  • Storing data with variable structure (e.g. generic columns vs xml vs delimited column...)
  • Denormalize data (how to do it with minimal impact, etc...)

解决方案

There's a book in Martin Fowler's Signature Series called Refactoring Databases. That provides a list of techniques for refactoring databases. I can't say I've heard a list of database patterns so much.

I would also highly recommend David C. Hay's Data Model Patterns and the follow up A Metadata Map which builds on the first and is far more ambitious and intriguing. The Preface alone is enlightening.

Also a great place to look for some pre-canned database models is Len Silverston's Data Model Resource Book Series Volume 1 contains universally applicable data models (employees, accounts, shipping, purchases, etc), Volume 2 contains industry specific data models (accounting, healthcare, etc), Volume 3 provides data model patterns.

Finally, while this book is ostensibly about UML and Object Modelling, Peter Coad's Modeling in Color With UML provides an "archetype" driven process of entity modeling starting from the premise that there are 4 core archetypes of any object/data model

这篇关于关系数据库设计模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆