【TDL - Small Synopsis 零基础入门学习MySQLVSCodeWin/Mac】

small synopsis on SQL/Mysql

  • I) Website path/route
  • II) context / quotation
    • 2.1) what is mysql and drawsql?
    • 2.2) command lines to install mysql
    • 2.3) annotation -- and block @
    • 2.4)

I) Website path/route

Url resource

II) context / quotation

2.1) what is mysql and drawsql?

Relational databases using SQL are king. In my recent poll, nearly two-thirds of viewers said that SQL was their go-to database, that’s despite the fact that it’s 40 year old tech with billions of dollars invested in disruptive technologies that try to knock sql off the throne.

Today you’ll learn everything you need to know about mysql and open source database(开源数据库) that powers content management systems lik wordpress, ecommerce plantforms like shopify, and social media giant twitter.

We’ll take a hands-on approach by recreating airbnb’s database, which happens to use mysql in real life. In the process, you’ll learn why mysql is so popular, how to install and interact with database using modern tooling vscode.

The essential syntax to create, read, update and delete data, and most importantly, how to model and join relational data (关系型数据)
【TDL - Small Synopsis 零基础入门学习MySQLVSCodeWin/Mac】_第1张图片
There’s also another give-away with this video, the mysql pillow, all you have to do is to be a subscriber and leave a comment below; to start things off, let’s travel back in time 50 years to meet Ted Codd, the author of the legendary paper, a relational model of data for large shared data banks (大型数据库中中的数据关系型模型). , to be completed in future if possible

2.2) command lines to install mysql

, to be completed in future if possible

We now have access to mysql in command line. And the first thing we’ll want to do is create a database, we can do that by executing an sql statement, that says create database followed by the database name, which in this case will be airbnb,
【TDL - Small Synopsis 零基础入门学习MySQLVSCodeWin/Mac】_第2张图片
We can then verify that it was actually created by typing show databases,

[root@iZ2vc5lqzt23aweti4j777Z ~]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.


mysql> CREATE DATABASE airbnb;
Query OK, 1 row affected (0.00 sec)

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| RECOVER_YOUR_DATA  |
| airbnb             |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
6 rows in set (0.00 sec)

2.3) annotation – and block @

***********************************TDL multiple sql lines commands

The first thing I want to point out is that you can create a comment in sql using double dash

  • mysql annotation sample
Show databases; --annotation
+--------------------+
| Database           |
+--------------------+
| information_schema |
| RECOVER_YOUR_DATA  |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.00 sec)

2.4)

Firstly we need to add the first table to it, which can be accomplished with a ‘create table’ statement (通过create table 语句声明实现), now a couple of things to note here;
A statement is code that does something, and we know this is statement (我们知道这是语句), because it ends with semicolon (结尾有问号); The words highlighted in purple are SQL key words, they’re reserved words (是保留字) that language
在这里插入图片描述

你可能感兴趣的:(DataBase,-,SQL,学习,mysql,数据库)