用于报告的数据视图或 Web 服务
我们希望向外部用户公开一些应用程序数据(在 MSSQL Server 中),以便他们可以在自己的报告环境中使用这些数据。
如果外部用户希望在 SSRS 或 Crystal 报告中进行报告,那么在可用性、报告创建简易性、安全性或性能方面,哪一个是更好的选择:
- 通过某些安全视图或存储过程公开数据
- 在 WCF 中创建数据 Web 服务
We wish to expose some of the application data (in MSSQL Server) to external users so that they can consume it in their OWN reporting environment.
Which would be the better options in terms of usability, ease of report creation, security or performance if the external users wish to do reporting in SSRS or Crystal reports:
- Exposing data via some secured views or sprocs
- Creating data web services in WCF
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果公开此数据的唯一目的是用于报告,那么我会倾向于选项#1,即通过安全视图或 SP 公开数据。原因是因为这将提供最佳性能,因为如果您使用必须访问数据库的 WCF 服务,那么与直接访问数据库相比,会涉及一些性能开销。
当然,这是假设您的客户拥有适当的工具来访问数据库,例如 SSRS 或 Crystal Reports,听起来他们就是这么做的。
但是,如果您认为稍后可能希望其他客户以其他方式(非报告方式)使用此数据,那么可能需要考虑 WCF 服务。它为外部数据访问提供了很大的灵活性,而无需让其他人直接访问您的数据库。例如,如果某人没有报告工具,但您想让他们访问此数据,如果他们可以使用 WCF 服务,那么您就一切就绪了。
总之,直接数据库访问可能会提供最佳性能,而 WCF 可能会提供最大的访问灵活性。因此,您在做出决定时应该考虑这些因素,并考虑到未来。
If the only purpose for exposing this data is for reporting, then I would lean towards option #1, which would be exposing the data via secured views or SPs. The reason is because this would offer the best performance, because if you go through a WCF service that has to then hit the database, there's some performance overhead involved there as opposed to just going directly against the database.
This is assuming, of course, that your customers have the proper tools to access the database, such as SSRS or Crystal Reports, which it sounds like they do.
However, if you think that later on you might want other customers to consume this data in other ways (non-reporting ways), then a WCF service might be something to consider. It offers a lot of flexibility for external access to data without having to provide someone direct access to your database. For example, if someone doesn't have a reporting tool but you want to give them access to this data, if they can consume a WCF service then you're all set.
In summary, direct database access would probably provide the best performance, whereas WCF would probably provide greatest flexibility for access. So you should consider these factors and also keep the future in mind when making your decision.