This is the 10th day of my participation in Gwen Challenge
Author: Cola
Source: Coke’s path to data analysis
Please contact authorization for reprinting (wechat ID: data_COLA)
1. What is SQL
SQL (Structured Query Language) is a Structured Query Language for databases. The common relational databases are MySQL, SQL Server, Oracle, and Access. What is a database? Excel2016 has 1048,576 rows, meaning it can store up to 1.04 million pieces of data. But if you really save 1.04 million pieces of data in Excel, your computer will probably be disabled. In the era of big data, data is in the millions, so you need a database to help. To summarize, SQL is a language for querying data stored in a database, so you know, SQL itself is a language, if you have the language learning foundation, then learning SQL is much easier.
2. Why do you want to learn SQL
Data analysis job recruitment, no matter which section, skilled use of SQL are necessary skills, so, learn to!
3, how to learn SQL
I recommend the physical book “SQL will know will know”, “simple to understand MySQL”, all system learning is built on the book, as an online tutorial, W3School, MySQL rookie tutorial are very good, as for the other video tutorial, not recommended, feel similar, mainly lies in their own understanding and practical operation.
You can download the MySql/ SQL Server/Access client for local operation, but there is a problem, you may not have a data source, you need to create your own table, the client is also very different from the client, MySql client is command line form, And Access is Microsoft interface is very similar to Excel database, for students without language foundation may be more friendly, at least it has an interface, but I thought since all learned SQL, toward the command line direction to learn it. Online practice words recommend SQLZoo to practice, this is a web version of the question bank, personal feeling for novice small white SQLZoo than the installation of those database client is more friendly.
4. Understanding basic concepts
Library, table, column, meaning of column, data type. A database contains at least one table, and each table contains at least one column. A library can be thought of as an Excel workbook in which a table is a sheet and a column is a field.
I mentioned earlier when I talked about retrieving data in Excel that data types in Excel can actually be divided into two categories: numeric and character. In SQL, too, there are dates and times in addition to characters and numbers.
You need to understand what fields each table contains, what they mean, and how the fields are stored before you can query.
5. Download and install
Baidu MySQL, enter the MySQL official website.
Scroll down to the Community page and click on it
For the first Conmunity Server, click Download
Click the go to Download Page on the blue background box, do not choose to download the following. Zip file package, zip needs to configure itself, very complex, slightly bad configuration will not use, MSI directly graphical configuration all the way to default.
Click in and select the second offline download
And they let you sign up. Just hit “No Thanks.
Then wait for the web page to finish downloading, click “Run” after downloading, click “Next”, and click “Execute” to install. After installing, continue “Next”.
Next all the way to the part where you need to configure the password, enter the password, and don’t forget to continue next to execute
Next goes south until you need to enter the password configured above, and then Next.
Once all setup and configuration is complete, you can find and open the MySQL client from the Start menu
Enter the password enter key, login.
To verify this again, type show database; It shows the database that the system stores.
If you feel sad about the command line interface, you can directly search the MySQL question bank and do the questions online, or use Access, a graphical interface. The interface is similar to Excel, friendly to small white, and can also use SQL statements, as shown in the figure below. But you’ve learned a lot. You’ve learned a lot.
6, grammar,
There are a few grammars to watch out for
- Semicolon (;) End an SQL statement
- It is case insensitive and customary for keywords to be capitalized
- Single quotes (‘ ‘) are used to qualify characters