V
V
Vadim Milevsky2018-01-28 22:14:03
SQL
Vadim Milevsky, 2018-01-28 22:14:03

How to solve sql comprehension problem?

The bottom line is that I sort of understand programming, I don’t have spaces here, but any question related to databases, no matter what SQL \ No SQL \ ElasticSearch (I know that this is not a database, but there is also a problem), sends me into a stupor for a week .. and all because I can’t even imagine how to build a query, although I know the syntax of a particular database.
In a recent case, Elastica was asked to display top tags based on all documents. If I solve this through PL in a couple of minutes, but it will be very inefficient, since elastic is faster, then I can’t directly make a request to it ... and I can’t because I don’t know how to describe, I don’t know how even form it....
take all content.... get tags from it.... sort tags... count their number..
I understand that this is a very big minus and I really want to solve it, but I don’t know how :( I thought about solving similar problems in my free time, I seem to be solving, trying to understand and find an answer in order to understand it. But anyway, I shut up ....
Tell me, how do you, experienced people, understand how to build queries, maybe you need to read something that will sensibly explain this to me, otherwise it’s impossible (

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
longclaps, 2018-01-28
@3gsxarakiri

take all content.... get tags from it.... sort tags... count their number..
SQL is a declarative language , it's time to learn more about it)

Y
Yerlan Ibraev, 2018-01-29
@mad_nazgul

Horses mixed up in a bunch, people ...
SQL is a declarative PL based on RMD.
NoSQL is the general name for everything that is not SQL, but a database.
In each case, you need to learn / understand something of your own.
Those. there is no general understanding for SQL/NoSQL.
But if you understand RMD and know SQL, then you can more or less work with all SQL databases.
Not so with NoSQL. Every NoSQL is unique. Accordingly, it is necessary to understand each separately

M
Mikhail Potanin, 2018-01-30
@potan

SQL is based on mathematics - relational algebra. It is worth first understanding the basic mathematical concepts, set, relation, factor-set, then SQL will become clearer. Yes, and serious programming languages ​​too.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question