数据库设计最佳实践 [英] Database Design Best Practices

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

问题描述

我很精通SQL Server,MySQL,Oracle等,但把这些数据库产品放在一边,有没有一个资源可以帮助我设计关系数据库?有没有什么像数据库设计的模式或最佳实践?



我看过几次数据库通常不可扩展;人们有个人偏好,保留列为isChecked列,其本质上是布尔型的,但存储为Char(1),其值为Y和N,而不是0和1,对我来说听起来更好。在数据库设计时不会犯同样的错误?



将非常感谢与书籍或文章的链接。



提前感谢

解决方案

几点:




  • 尽可能了解问题域

  • 了解您的数据库提供者提供的数据类型的知识,您无法创建良好的数据模型

  • 如何正确使用规范化和设计表

  • 性能:何时以及如何应用索引,如何编写高效的查询等。

  • 何时以及如何使用不同的数据库对象,如视图,过程,函数,触发器


I am pretty well versed with SQL Server, MySQL, Oracle etc but putting these Database products aside, is there a resource that will help me design relational databases well? Is there something like patterns or best practices for database design?

I have seen a few times that database is often not scalable; people have personal preferences with keeping columns like isChecked column which is boolean in nature but stored as Char(1) with values like 'Y' and 'N' instead of 0 and 1 which to me sounds better. Ways not to commit common mistakes while doing database design?

Links to books or articles will be highly appreciated.

Thanks in advance.

解决方案

A few points:

  • Learn as much as you can about problem domain. You can't create good data model without knowing what you're designing for
  • Have good knowledge about data types provided by your database provider
  • How to properly use normalisation and design tables
  • Performance: when and how to apply indexes, how to write efficient queries etc.
  • When and how to use different DB objects like views, procedures, functions, triggers

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

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