L
L
login73532018-08-27 15:47:13
SQL
login7353, 2018-08-27 15:47:13

How to learn SQL database language?

Google advises “Learning SQL” by Alan Bewley, but he wrote about version 4 of MySQL, and now it’s already 8.
Or does this change nothing and the book will still be normal?

Answer the question

In order to leave comments, you need to log in

9 answer(s)
P
poimanoo, 2018-08-27
@poimanoo

Before the interview for the position of sql-jun, being a complete zero, I solved problems on this site overnight and the next day I solved all the proposed tasks and was accepted) I will say this - I would advise you to solve these problems, they are offered there in increasing complexity and supported by theory, for which you do not need to climb into textbooks once again. I assure you, with every ten tasks you solve, you will feel like a sql guru) After 30 tasks, when you have an idea of ​​​​what SQL really is, then you can start reading literature, believe me, after practice it is much easier to perceive the material, because already have an idea of ​​what it is.
According to the literature (with some explanations):
1. Introduction to database systems (Author CJDate) - in my opinion, a very accessible and maximally compact description of what SQL is based on, the basic concepts are chewed, normal forms are considered, and then puzzles are offered.
2. SQL Complete Guide - here it is clear by name, here you can find a description of all the features. Look for the latest edition (I have the third, for example, this is 2015).
3. Programming SQL databases Typical errors and their elimination - I fell in love with this book for its ease and clarity. Here you will not only be shown clearly how not to do it, but they will also offer possible and most effective solutions for certain situations.
If you chose MS SQL Server:
1. Microsoft SQL Server 2012 Guide for beginners - although not going deep enough, almost everything that is needed at the initial stages is described. There, about indexes, and about optimization, and about business intelligence, in general, I recommend it.
2. Microsoft SQL Server 2012 Creating queries - simple and comprehensive (at the time of publication) about how you can and should write queries in t-sql (sql extension for MS SQL Server) with the consolidation of the material by the proposed tasks.
If you chose Postgresql, then the official guide there is exhaustive.
I cannot give advice on Oracle and MySQL, because I had no business. Good luck!

A
Alexander Novikov, 2018-08-27
@AlexndrNovikov

Books are, of course, great, but as practice shows, most of the book either throws, or just reads and absorbs not very new knowledge. (if we are talking about novice developers who start reading a book straight from scratch)
And the most logical way to learn something is practice, practice and more practice. If there is no real project with real problems, I would recommend a couple of resources: sql-ex and pgexercises , there you can work with very simple and primitive queries, as well as with much more complex ones.
Well, having mastered the basics, you can already take a book to close the gaps, or documentation for a specific DBMS

D
Dmitry Kovalsky, 2018-08-27
@dmitryKovalskiy

SELECT/INSERT/UPDATE/DELETE and JOINs have not changed. Much of working with SQL is mastery of these commands.

D
Denis, 2018-08-28
@akaish

Unfortunately, in order to advise you something, you need to know your personal "foundation". Although the book you indicated will be useful (even taking into account the fact that it was written for MySQL version 4.x, fundamentally both in the DBMS and in SQL and in the specific MySQL syntax for the last, probably a decade, nothing has changed), I would advised the following learning algorithm:
1) Acquaintance with the basics of relational algebra, normal forms and the relational model. Without fanaticism, reading and understanding articles even on Wikipedia is enough for the eyes.
2) Acquaintance with the SQL2008 specification. Again, no fanaticism. In any case, you will subsequently work with a certain dialect of the language.
3) Choice of dialect of the language. Selection of literature (almost any, with the exception of books from the series "{0} for dummies" and "100 and one solution for {0}"). At this stage, it is also important to decide on the tools that you will use in the future. For starters, any online SQL code interpreter will do, for example sqlfiddle . But as you learn, you will need more sophisticated tools.
4) Familiarity with UML. More precisely, if at a minimum, with the part that affects the prototyping of the database. SQL and DBMS are tools that allow you to automate business logic processes. UML allows you to describe these processes and, based on these processes, create a database schema prototype, from which you can already go to a specific implementation.
So. The four basic steps have been completed. Then everything is simple, digest the information and practice from simple to complex (quite suitable sets of tasks have already been indicated in the comments). Along the way, you will learn the features of the software implementation of your chosen DBMS. And carefully read the documentation from the developer. Using SQLite as an example, they have analyzed the semantics of queries in detail: SQLite CREATE . Under MySQL you will find it yourself.
Now I will explain why all four steps are important.
1) Without basic fundamental knowledge, you simply won’t understand why, for example, two phone numbers cannot be indicated in a number column cell, or how data integrity restrictions work.
2) Although the SQL dialects differ from the SQL:2008 standard, it should be understood that knowledge of the standard will allow you to switch from one DBMS to another if necessary. Also, a good relational SQL DBMS should be compatible with this standard a priori.
3) Here to your taste. Look at the author's presentation before buying, look at the lists of this or that software. But the fact remains that reading only standards, manuals and official documentation is clearly not the way for everyone. Someone just needs an "artistic" presentation, and just from books you can draw real examples from the author's experience.
4) It must be understood that relational DBMS is just a tool for storing and processing data that provides certain business processes of a certain subject area. And business processes should be understood not as some kind of ephemeral thing for an ordinary person, but what is laid down under this word in the original language, i.e. a set of processes/actions aimed at creating a product/providing a service. And UML tools allow you to describe all this in a standardized graphical form. To know SQL, you don't need to know UML, you don't need to know what is and, for example, the life cycle of a software product. But over time, if you want to grow further, you will need a prototyping tool. Just like if you grow up to be a database architect, you will need an idea of ​​​​how to design these databases, starting with the description of the subject area and ending with the organizational point of view. GOST 34.601-90 and ISO/IEC 12207:2008 standards.
I, like many, started with some semi-read textbook and examples from the net. Now I realize that I was just wasting my time. Oddly enough, although it is customary to scold our education, the list of courses for the "PI" specialties was chosen for a reason. In addition to the language itself, you should know the mathematical "backend" and how to use it to implement domain problems. I treat SQL as a consumer, it is not my main language, but now I understand that if I paid more attention to it not as a language, but, first of all, as one of the DBMS tools that work on the basis of relational algebra to provide business processes, I would have avoided a lot of wasted time, crutches and mistakes. I hope my answer will be useful to you.

S
shushpanio, 2018-08-27
@shushpanio

Martin Gruber - Understanding SQL

K
Kolymenkov, 2018-08-28
@Kolymenkov

If you are completely zero, then the very first thing is to download the book “Master SQL on Your Own in 10 Minutes”.
Further. You go to the sites: 1) sql-ex.ru (you choose the syntax); 2) sql-tutorial.ru (there is T-SQL syntax). You solve about 60 learning problems in DML and about 20 in DDL.
Further. You download the book by Svyatoslav Kulikov “The work of MYSQL, MS SQL SERVER and ORACLE in examples”. This is where you define the database. If it is SQL Server, then you download this DBMS on a torrent. If Oracle, then download the image for WMvare from their site, or use their online DBMS.
Further. You find serious books depending on a DBMS. If you want to be a basic, then to check if you can pull it off, take the sql-ex exam for a basic certificate, for this you need to solve rating problems. If you can't, then there will be great difficulties in working as a database programmer.
Next, the last step. You pass exams from the vendor.
If you are just a programmer, not a basic player, then you only need the basics.
Ps It is a pity that the administration removes qualitative questions regarding the field of programming, its disadvantages and prospects. It's a pity, but I understand the monetization of the site.

N
Nekit Medvedev, 2018-09-06
@NIKROTOS

O REILLY Learning SQl By Lynn Bailey
A great book to start with, written "for the people". The author is primarily concerned with understanding the language and what it is for.+ Written in a conversational style.

A
Alexander, 2018-09-06
@Captain

In my personal experience, the most difficult thing in learning SQL was not to read books, but to change my mind. If you already have some kind of programming language in your luggage, then you want to present SQL by analogy. But that's not the case at all. SQL is about storing and retrieving data. First of all, you need to understand what plates are in general, the fields between them, links, indices. And SQL itself is a purely technical application.

N
Natalia Petrova, 2020-09-22
@natalyos

I agree with other respondents that it seems to be no longer relevant to study this through books, and some online lessons, web resources with which you will get more modern knowledge are much more effective. Everything is changing very quickly, including database languages, so I would recommend not studying literature, but finding a tutor or taking online courses. For example, there are free ones on Coursera and Stepik, designed for beginners.
If you already have some experience, choose more advanced courses from the kursfinder.ru/sql/ list, and be sure to pay attention to practice and the opportunity to consult with a teacher, because not everyone offers such services along with theory.
But if these are the books you need, advice from me:

  • SQL. The Complete Guide, James R. Groff, Paul N. Weinberg;
  • SQL. Collection of recipes "Molinaro Anthony.

Both books can be ordered on ozone :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question