数据库 非规范化
Denormalization is a performance enhancement technique through database Optimization by adding redundant data in a normalized database. The requirement is to enhance the performance of a database by adding more redundant data and not reducing it by normalization because of slow processing in data retrieval, as queries written by developers take more time to address different types of tables which contain normalized data.
反规范化是通过在规范化数据库中添加冗余数据来通过数据库优化来提高性能的技术。 要求是通过添加更多的冗余数据来提高数据库的性能,而不是通过归一化来减少数据库的性能,因为数据检索处理速度较慢,这是因为开发人员编写的查询需要更多时间来处理包含归一化数据的不同类型的表。
The process to be followed, the first thing a developer needs to do is normalize the data through normalization by reducing the redundant data and by increasing its data integrity and updating. The purpose of normalization is to structure, each piece of data in different types of tables. This process slows down the queries performances, as each query require to address each piece of data in different tables. The normalization of data works better in case of fewer amounts of data, as the queries have to address fewer numbers of tables with specific pieces of data.
开发人员要做的第一件事是通过减少冗余数据并提高其数据完整性和更新性,通过规范化对数据进行规范化。 规范化的目的是在不同类型的表中构造每个数据。 该过程会降低查询性能,因为每个查询都需要处理不同表中的每个数据。 在数据量较少的情况下,数据的标准化效果更好,因为查询必须处理较少数量的具有特定数据的表。
Example: A Set of structured data is given in which a tables of,
示例:给出了一组结构化数据,其中包含
user_details
user_details
client_details
client_details
customer_details
顾客信息
task
任务
meeting
会议
production
生产
supply
供应
order
订购
outcome
结果
product_proposed
product_proposed
product_sold
product_sold
are given. Then these kinds of small amounts of data which also include each piece of data in each table as per requirement, example,
给出。 然后,这些少量的数据(根据要求)还包括每个表中的每个数据,例如,
id
ID
first_name
名字
last_name
姓
password
密码
user_account_id
user_account_id
outcome_data
result_data
start_time
开始时间
end_time
时间结束
Client_name
客户名称
Client_id
客户编号
Client_address
客户地址
Phone
电话
Email
电子邮件
Contact
联系
Product_id
产品编号
Task_id
Task_id
Meeting_outcome
Meeting_outcome
User_assigned
用户分配
Insert_user
Insert_user
Update_user
更新用户
Manager_account
经理帐户
Supply_order_id
Supply_order_id
Units
单位
Price_per_unit
每单位价格
Order_details
订单详细信息
Delievery_details
Delievery_details
Outcome_text
结果文字
Completion_success
完成_成功
are given for the retrieval of data.
给出用于数据检索。
The requirement of Denormalization of database comes, when there is a huge amount of normalized data, which because of the amount, more tables, less redundancy, multiple joins and too many queries to address all the different tables which contains a different pieces of data makes the speed of performance very less, takes time to address each specific data.
当存在大量规范化数据时,需要使用数据库非规范化 ,这是由于数量大,表多,冗余少,多个联接以及太多查询无法处理包含不同数据的所有不同表而导致的。性能的速度要差得多,需要花费时间来处理每个特定的数据。
The advantages of opting for Denormalization are:
选择非规范化的优点是:
The data retrieval becomes easy and faster in comparison to normalization.
与规范化相比,数据检索变得容易和快捷。
Queries to address all the data become simple as there is less number of tables.
由于表数量较少,因此查询所有数据的查询变得很简单。
No requirement of Multiple joins.
无需多次联接。
Enhancement in query performance.
增强查询性能。
No Requirement of a real-time generation of common values in the computation.
无需在计算中实时生成公共值。
The disadvantages of opting for Denormalization are:
选择非规范化的缺点是:
Data redundancy requires more storage for addition of redundant data.
数据冗余需要更多存储空间以添加冗余数据。
Updation and insertion becomes difficult.
更新和插入变得困难。
Data management and adjustment becomes trickier.
数据管理和调整变得更加棘手。
Requirement of detailed documentation.
详细文档要求。
翻译自: https://www.includehelp.com/dbms/denormalization-in-database.aspx
数据库 非规范化