我如何帮助想要 CSV 格式的关系数据库数据的人?

发布于 2024-09-26 08:57:20 字数 473 浏览 0 评论 0原文

非技术人员会问:“您能为我将数据库放入 Excel 电子表格中吗?”太常见了,几乎成了一个比喻。 (我发誓有一个关于此问题的 xkcd,但我找不到它。)我们经常让客户询问 CSV 中的所有数据。

说这个人不懂技术是多余的,所以我需要以一种非技术的、友好的、非居高临下的方式向他们解释 Excel 不是设计来表示一对多关系的(不让他们理解这个想法)一对多)。

如果您有过对非技术人员有效的特定策略的个人经验,我绝对想听听。

编辑:似乎大多数答案都倾向于质疑请求者的意图。这本身就是一件很难做好的事情。有些答案倾向于只是向一个人扔数据并告诉他们离开。这不是我来这里的目的。我想帮助这个人,而不是让他们离开。这就是我想要达到的目的。

所以,分为两部分的问题: 当客户(即我想要满足其需求的人)请求数据的 CSV 以进行 a.) 备份或 b.) 从系统中获取信息时,我该怎么告诉他们呢?

由于这里没有确切的正确答案,欢迎有证实的答案。

The non-technical person who asks, "Can you just put the database in an Excel spreadsheet for me?" is so common it's almost a trope. (I could've sworn there was an xkcd about this, but I can't find it.) We regularly get customers asking for all their data in a CSV.

To say this person is non-technical is redundant, so I need to explain to them in a non-technical, friendly, non-condescending way that Excel is not designed to represent one-to-many relationships (without making them grok the idea of one-to-many).

If you have had personal experience with a particular strategy that has worked for you with non-technical people, I'd definitely like to hear it.

EDIT: It seems like most of the answers are leaning toward questioning the intent of the requestor. That, in itself, is a difficult thing to do nicely. Some of the answers are leaning toward just throwing data at a person and telling them to go away. That's not what I'm going for here. I'm looking to help this person, not make them go away. That's what I'm trying to get to here.

So, two part question:
What do I tell a customer (i.e., someone whose needs I want to satisfy) who requests a CSV of their data for a.) backup, or b.) getting information out of the system.

Since there's no exact right answer here, substantiated answers are welcome.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

辞慾 2024-10-03 08:57:21

请他们向您发送一份空白电子表格,其中包含他们想要的内容的列标题,并告诉他们您将填写该电子表格。

当空白电子表格收到时,以下两件事之一将是正确的:

  1. 您将很容易能够满足项目的要求(例如,无需困惑如何找出 5 个电话号码中的哪一个是 Phone1 和 Phone2)。

  2. 您会提出一些问题(例如“我每人有 0 到 25 个电话号码。您希望我如何选择哪个是 Phone1,哪个是 Phone2?您希望我如何处理多余的电话号码?” )。

如果第二种情况属实,客户要么能够为您提供答案,要么他们会意识到以电子表格形式表示他们想要的数据存在真正的问题,并希望在计划下一步时寻求您的帮助。

Ask them to send you a blank spreadsheet with the column headings for what they want, and tell them you'll fill it in.

When the blank spreadsheet comes one of two things will be true:

  1. You will pretty easily be able to meet the requirements of the project (eg, no puzzling how to figure out which of 5 phone numbers is Phone1 and Phone2).

  2. You will have some questions (such as "I have anywhere from 0 to 25 phone numbers per person. How do you want me to choose which is Phone1 and which Phone2? And what do you want me to do with any extras?).

If the second is true, the client will either be able to provide you with answers or they will realize that there is a genuine problem representing the data they want in spreadsheet form and, hopefully, ask for your assistance in planning the next step forward.

樱娆 2024-10-03 08:57:21

当经理想要某样东西时,他们可以含糊其辞,我怀疑他/她只是想要从中获得特定的视图,而不是“所有 Salesforce 的东西”。
您需要澄清数据的用途,并为他们提供他们需要的东西,而不是他们要求的东西。

Managers can afford to be vague when they want something, I suspect that rather than 'all the Salesforce stuff', he/she just wants a particular view from it.
You need to clarify what the data is for and give them what they need rather than what they asked for.

记忆で 2024-10-03 08:57:21

请求 CSV 格式的关系数据并没有什么问题。您可以选择将每个表转储到以逗号分隔的文本文件中,或者更好一点,将一对一的数据连接到单个 CSV 文件中。一对多关系显然更加棘手。

我建议与这些人交谈并询问他们想通过这样做解决什么问题。显然,他们想要创建一些电子表格,但没有意识到通过使用 CSV 路线,他们将无法处理后续的架构更改等。与您的“客户”交谈后,您可能会同意正确的路径。而且,这可能只是为一次性交易创建 CSV 文件。

我个人曾与一些非技术人员一起工作过,他们对 Excel 的使用非常出色。

There is nothing wrong with asking for relational data in a CSV format. You have your choice of just dumping each table into a text file separated by commas, or being a bit nicer and joining one-to-one data into a single CSV file. One to many relationships are obviously trickier.

I recommend talking to the guys and asking them what problem they want to solve by doing this. Obviously, they want to create some spreadsheets, but don't realize that by going the CSV route they won't be able to handle subsequent schema changes, etc. After talking with your "customer", you can probably agree on the correct path. And, that just might being creating a CSV file for a one-shot deal.

I've personally worked with some non-tech guys who were amazing with Excel.

长发绾君心 2024-10-03 08:57:21

如果我有时间,我通常会详细询问他们想要什么。如果我没有发现任何大问题,我就会这样做。毕竟我不想事后猜测他们。正如这篇文章中所说

如果您查看任何活动、流程,
或者从足够远的地方进行纪律
看起来很简单。管理人员没有
发展经历 想什么
程序员做的事情很简单并且
没有经验的程序员
管理层的想法相同
经理们这样做。

因此,如果您不知道他们为什么需要它,请尝试尽最大努力向他们提供他们想要的东西。

If i have time, i usually ask them in details what they want. If i don't see any big problem, i do it. After all i don't want to second-guess them. As it says in this post

If you look at any activity, process,
or discipline from far enough away it
looks simple. Managers with no
experience of development think what
programmers do is simple and
programmers with no experience of
management think the same of what
managers do.

So if you don't know why they may need it, try to give them what they want to the best of their explanation.

最终幸福 2024-10-03 08:57:21

每个表给他们一个工作表,所有工作表都在同一个工作簿中,与存储的完全相同。他们很快就会明白为什么需要坚持使用报告或如何获取他们真正需要的数据。

Give them one worksheet per table, all in the same workbook, exactly as it's stored. They'll figure out pretty quickly either why they need to stick with the reports or how to ask for the data they really need.

雪化雨蝶 2024-10-03 08:57:21

这是一个相对较旧的问题,因此我认为再添加一个答案是适当的,该答案反映了提出问题时不可用的选项。以下是导出到 Excel 的方法,同时充分表达要导出的数据的关系性质:

  • 首先将关系数据导出到 Excel,数据库中的每个表对应于工作簿中的一个工作表,包括第一行中的列标题。
  • 将这些数据表中的每一个转换为 Excel 中的命名表格(最简单的方法就是选择“格式为表格”)。
  • 使用名称管理器将表名称编辑为您想要的名称
  • 对于每个命名的“表”,选择 PowerPivot 功能区上的添加到数据模型
  • 选择 PowerPivot 功能区上的管理,然后选择图表视图以查看表中的表数据模型
  • 连接表以建立它们的关系,类似于在 SQL Server 数据库图表中的方式
  • 如果您有复合键,则可以创建计算列来充当代理键,因为 PowerPivot 数据模型不支持使用多个列的

键此时,关系模型已完全在 Excel 中表示,并且可以创建数据透视表甚至利用数据和关系的仪表板样式 PowerView 报告。虽然我同意在满足客户期望方面所接受的答案,但当客户确实需要在维护关系的情况下导出数据时,这种方法是一种可能的答案。

This is a relatively old question, so I feel it appropriate to add one more answer that reflects options that were not available when the question was asked. Here is an approach for exporting to Excel while fully expressing the relational nature of the data you are exporting:

  • Start by exporting relational data to Excel with each table your database corresponding to a sheet in your workbook, including column headers in the first row.
  • Convert each of these sheets of data into named Tables in Excel (easiest way is just selecting Format as Table).
  • Use the Name Manager to edit your table names to be what you want to call them
  • For each named "Table", select Add to Data Model on the PowerPivot ribbon
  • Select Manage on the PowerPivot ribbon and then select Diagram View to view the tables in the data model
  • Connect the tables to establish their relationships similar to how you would in a SQL Server database diagram
  • If you have compound keys, you can create calculated columns to act as surrogate keys, as the PowerPivot data model does not support keys using multiple columns

At this point the relational model is fully represented in Excel and it is possible to create pivot tables or even dashboard style PowerView reports that leverage both the data and the relationships. While I agree with the accepted answer in terms of meeting customer expectations, this approach is one possible answer when the customer really does need the data exported with the relationships maintained.

波浪屿的海角声 2024-10-03 08:57:21

几乎可以肯定的是,一份具体的报告或清单可以解决所要求的问题。

要么从整体总结的角度提出一个并展示它,然后开始讨论他们真正想要的东西,或者只是开始讨论 - 这更难,因为大多数非技术人员可以向你展示他们不喜欢的东西比在一张白纸上描述他们喜欢什么更容易存在的东西。

it is almost certainly a specific report or listing that will solve what is being asked for.

either make one up from an overall summary perspective and show it, and then start the discussion of what it is they really wanted, or just start the discussion - which is harder since most non technical people can show you what they don't like on something that exists more easily than describe what they do like on a blank sheet of paper.

〃安静 2024-10-03 08:57:21

一个易于创建的简单的深入报告可能会很好。就像 Ruby on Rails 如何创建一个简单的 CRUD 应用程序一样,应该存在类似的工具,只需单击几下,然后您就可以获得基于 Web 的深入分析报告。

A simple drill down report, that is easy for you to create might be good. just like how Ruby on Rails create a simple CRUD app, similar tool should exist that is a few clicks and then you get a web based drill down report.

非要怀念 2024-10-03 08:57:21

你别无选择,只能这样做。
我做了很多实现,每次客户要求从 Excel 导出/导入。
事实上,如果应用程序不提供此类功能,他们不会认真对待您。他们会去别的地方。所以你需要做的就是接受事实并解决它。

导出到 Excel 很棘手,不幸的是 Microsoft (SSIS) 提供的解决方案给出了有趣的结果并且缺乏格式选项。然而这是可能的(我们所有的应用程序都可以与 Excel 一起正常工作)

You have no other choice but do it.
I did a lot of implementations and every time customers asked for export/import from excel.
In fact they will not take you seriously if the application does not provide this kind of functionality. They will go somewhere else. So all you need to do is accept the fact and sort it out.

Export to excel is tricky and unfortunately solutions provided by Microsoft (SSIS) give funny results and lack formatting options. However it is possible (All our applications work correctly with Excel)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文