数据库透视

编程入门 行业动态 更新时间:2024-10-22 17:37:59
本文介绍了数据库透视-目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

为什么有人想要将列转换为行(即旋转)?它可以解决哪个问题?

Why would someone want to convert columns into rows (ie pivoting)? Which problem does it solve?

我找到了一些链接,但对这些问题没有得到满意的答案.

I found some links, but did not get satisfactory answers to the questions.

codeghar.wordpress/2007/11/03/pivot-tables/

msdn.microsoft/en-us/library /ms177410%28SQL.105%29.aspx

推荐答案

通常,这是因为布局在旋转后在报表或用户界面中效果更好.

Usually, it's because the layout works better in a report, or user interface after pivoting.

规范化数据库上的数据可能会导致多个记录呈形状",UI希望将这些记录视为字段.数据规范化很棒,但是当要以简洁自然的格式表示数据时,通常需要进行数据透视.

Data on a normalized database may result in data in the "shape" of multiple records, where the UI wants to see those records as fields. Data normalization is great, but when it comes to representing data in a concise, natural format, pivoting is often necessary.

此处的示例.

当然,我链接到的示例是Excel,而不是真正的数据库,但图片描述了一个示例,其中透视数据看起来更自然,概念相同.

Granted, the example I linked to is Excel, not a true DB, but the pictures describe an example of where the pivoted data looks more natural, and the concept is the same.

更多推荐

数据库透视

本文发布于:2023-07-08 20:11:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1080235.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:透视   数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!