本文介绍了数据库规范化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是数据库设计的新手,我已经阅读了很多关于规范化。如果我有三个表:住宿,火车站和机场。我在每个表中有地址列或其他表引用的地址表?是否有过度规范化的问题?
I'm new to database design and I have been reading quite a bit about normalization. If I had three tables: Accommodation, Train Stations and Airports. Would I have address columns in each table or an address table that is referenced by the other tables? Is there such a thing as over-normalization?
感谢
推荐答案
数据库规范化是关于构建关系(表),维护关系(表)中的事实(列)和构成模式的数据库(表)之间某些功能的
依赖
)。
Database Normalization is all about constructing relations (tables) that maintain certain functionaldependencies among the facts (columns) within the relation (table) and among the various relations (tables)making up the schema (database). Bit of a mouth-full, but that is what it is all about.
是关于数据库理论的经典参考正常形式。本文简单定义每个正常形式的本质是
及其对数据库表设计的意义。这是一个非常好的触摸式参考。
A Simple Guide to Five Normal Forms in Relational Database Theoryis the classic reference for normal forms. This paper defines in simple terms what the essence of each normal form isand its significance with respect to database table design. This is a very good "touch-stone" reference.
要正确回答您的具体问题需要更多信息。您必须询问
的一些关键问题是:
To answer your specific question properly requires additional information. Some critical questions you have to askare:
这一切都说,你的问题的答案不像你所期望的那么简单!
All this to say, the answer to your question is not as straight forward as one might hope for!
有没有过度规范化的东西?也许。这取决于您确定并用于构建表的
函数依赖关系是否为
对您的应用程序域有重要意义。
Is there such a thing as "over normalization"? Maybe. This depends on whether thefunctional dependencies you have identified and used to build your tables areof significance to your application domain.
例如,假设确定地址
由多个属性组成;其中之一是邮政编码。技术上,邮政
代码也是一个复合项目(至少是加拿大邮政编码)。进一步规范你的
数据库来识别这些事实可能是一个过度规范化。这是因为
邮政编码的组件与您的应用程序不相关,因此将
纳入数据库设计将是一个过度规范化。
For example, suppose it was determined that an addresswas composed of multiple attributes; one of which is postal code. Technically a postalcode is a composite item too (at least Canadian Postal Codes are). Further normalizing yourdatabase to recognize these facts would probably be an over-normalization. This is becausethe components of a postal code are irrelevant to your application and therefore factoringthem into the database design would be an over-normalization.
这篇关于数据库规范化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!