加入收藏 | 设为首页 | 会员中心 | 我要投稿 开发网_郴州站长网 (http://www.0735zz.com/)- 云通信、区块链、物联设备、云计算、站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

数据库设计 – 什么时候应该反规范化?

发布时间:2021-03-31 10:10:58 所属栏目:MsSql教程 来源:网络整理
导读:我想我们都熟悉 database normalization. 我的问题是:当您想要对表进行非规范化时,您使用了哪些指导原则? 解决方法 在OLAP操作时进行非规范化,在OLTP时进行规范化(来自Denormalization部分下的链接文章) Databases intended for online transaction proc

我想我们都熟悉 database normalization.

我的问题是:当您想要对表进行非规范化时,您使用了哪些指导原则?

解决方法

在OLAP操作时进行非规范化,在OLTP时进行规范化(来自Denormalization部分下的链接文章)

Databases intended for online transaction processing (OLTP) are
typically more normalized than databases intended for online
analytical processing (OLAP). OLTP applications are characterized by a
high volume of small transactions such as updating a sales record at a
supermarket checkout counter. The expectation is that each transaction
will leave the database in a consistent state. By contrast,databases
intended for OLAP operations are primarily “read mostly” databases.
OLAP applications tend to extract historical data that has accumulated
over a long period of time. For such databases,redundant or
“denormalized” data may facilitate business intelligence applications.
Specifically,dimensional tables in a star schema often contain
denormalized data. The denormalized or redundant data must be
carefully controlled during extract,transform,load (ETL) processing,
and users should not be permitted to see the data until it is in a
consistent state. The normalized alternative to the star schema is the
snowflake schema. In many cases,the need for denormalization has
waned as computers and RDBMS software have become more powerful,but
since data volumes have generally increased along with hardware and
software performance,OLAP databases often still use denormalized
schemas.

Denormalization is also used to improve performance on smaller computers as in computerized cash-registers and mobile devices,since these may use the data for look-up only (e.g. price lookups). Denormalization may also be used when no RDBMS exists for a platform (such as Palm),or no changes are to be made to the data and a swift response is crucial.

(编辑:开发网_郴州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读