什么时候应该使用C ++而不是SQL? [英] When should I use C++ instead of SQL?

查看:109
本文介绍了什么时候应该使用C ++而不是SQL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个C ++程序员,偶尔使用MySQL来处理数据库,但我的SQL知识相当有限。然而,我肯定愿意改变这一点。

I am a C++ programmer who occasionally uses MySQL to work with databases, but my SQL knowledge is rather limited. However I am surely willing to change that.

目前,我试图对我的数据库中的数据只进行SQL查询分析(!)。但我要放弃,而是将数据导入C ++,并用C ++代码进行分析。

At the moment I am trying to do analysis(!) on the data I have in my database solely with SQL queries. But I am about to give up, and instead import the data to C++ and do the analysis with C++ code.

我已经与我的同事讨论过了,他们也推动我使用C ++,说SQL不是用于复杂的分析,但主要用于导入(从现有表)和导出(到新表)数据,还有一点点,如合并数据 - 例如 - 加入表格。

I have discussed this with my colleagues, and they also push me to use C++, saying that SQL is not meant for complex analysis but mainly for importing (from the existing tables) and exporting (to new tables) data, and a little bit more such as merging data to - e.g. - joined tables.

有人可以帮我画一条线吗?所以我知道什么时候切换到C ++?当然性能也是一个问题。

Can somebody help me drawing a line? So I know when to switch to C++? Of course performance is also an issue.

什么是迹象表明事情在SQL中变得复杂?或者我可能只是采取错误的方法设计查询。那么我在哪里可以找到教程,书籍...以采取更好的方法?

What are indications that things get to complex in SQL? Or maybe I just take the wrong approach with designing the queries. Then where can I find tutorials, books, ... to take a better approach?

我希望这不是太模糊。我真的有点失落。

I hope this is not too vague. I am really a bit lost.

推荐答案

SQL在分析大量关系数据时非常出色。

SQL excels at analyzing large sets of relational data.

绘制线条的地方是您的分析范围。

The place to draw the line is the scale of your analysis.

如果您分析大量记录作为一个单位,SQL是绝对的最好的工具。

If you analyze large sets of records as a unit, SQL is definitely the best tool for that job.

逐行分析不是SQL的设计或优化非常好。但是,如果你想知道一百万行数据组的数据,请在数据库中。

Row-by-row analysis is not something SQL is designed or optimized for very well. But, if you want to know something about a million-row group of data, do it in the database.

这篇关于什么时候应该使用C ++而不是SQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆