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
JAVA, but nevertheless, there are other database managers such as
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
- PK (Primary key)
- FK (Foreign key)
- Unique data
- Int -> AUTO-INCREMENT
- Stored Procedures
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,
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 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
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.