Introduction to MYSQL 8.0

Hello everyone, welcome to this new entry in my blog, at this moment I will be talking about an introduction about what MYSQL is, since after seeing a bit about mysql, we will connect it with GCP!

And well MYSQL is an open source relational database manager, used in different programming languages ​​to generate data in the view of an application, one of the most popular languages ​​that makes constant use of mysql, is PHP and JAVA, but nevertheless, there are other database managers such as POSTGRESQL,
PLSQL,
NOSQL
that lately have had a lot of reception and usability in the world of mobile, web and native development.

With mysql, you can creating a

  • Database
  • Tables
  • ID
  • PK (Primary key)
  • FK (Foreign key)
  • Unique data
  • NULL
  • Int -> AUTO-INCREMENT
  • NOT_NULL
  • Varchar
  • Date
  • Stored Procedures
  • Standardization
  • Functions
  • Triggers
  • Queries
  • Subqueries

To create a database is too easy, you just need to write this syntax: Create Database "database_name" I will show you a practical example in MYSQL PHPMYADMIN!

To create a table is too easy, you just need to write this syntax:

CREATE TABLE "database_name"(id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
firstname VARCHAR(30) NOT NULL,
lastname VARCHAR(30) NOT NULL,
email VARCHAR(50),
birthday DATE) NOT NULL

To create, update and delete data in a table, the syntax is as follows: INSERT INTO, UPDATE AND DELETE

I will show you everything from the graphical part, but nevertheless, I will give you an example so that you can also do it in a query.

INSERT INTO demo.test
(id,
firstname,
lastname,
email,
reg_date)
VALUES
(
1,
"Lina",
"castro",
"[email protected]",
2020-01-01);

To create a small query, you should always use the syntax: SELECT * FROM "table_name"

we will filter, by id and by name.

we will filter, by MAX

we will filter, by SUM

t

we will filter, by WHERE

In the next post, we will see the whole part of the queries, with INNER JOIN, LEFT JOIN, RIGHT JOIN QUERIES WITH FUNCTIONS,
GROUPINGS, OPERATORS AND, OR, NOT,
with real queries for SQL.

I hope this introduction is to your liking, if you have any questions, do not forget to leave it in the comments.

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *