Getting started with The Basics of MySQL


Contents:


What is a database?
База данных is a collection of information that is structured and s...
Database management system
Система управления базами данных - this software for working with t...
The concept of the primary field
Первичное поле - this field, the values of which allow you to disti...
The concept of an index
Индекс таблицы is a special database object that is created by the...
The concept of foreign key
Внешний ключ is a field (or set of fields) whose values are taken f...
Normalization
Нормализация базы данных is the process of bringing the method of s...
Type of connection one to one
In previous lessons, we talked about foreign keys and table relationships. Links of tables can be of...
One-to-many communication type
Connectivity один ко многим means that a single record in the table...
Many-to-many communication type
Connectivity многие ко многим means that one record in the table
MySQL DBMS. Interfaces for MySQL
In our lessons, we will consider the MySQL relational database. This system is the most popular amon...
Authorization of users in MySQL
To authorize in MySQL, you need three parameters: the user name, password and host (IP address) wher...
Log in to phpMyAdmin of your Devionity project
You can use phpMyAdmin along with your project Devionity. To do this, you need to create your own pr...
Data types: INT numbers
AT MySQL Numeric data types are integers and floating-point number...
Data types: FLOAT, DOUBLE
Floating point numbers in MySQL are defined by keywords FLOAT and DOUBLE...
Data types: CHAR, VARCHAR
String data types in MySQL are CHAR and VARCHAR. In this case, after the...
Data Types: TEXT
To store lines that are longer than 255 characters use types
Data types: date/time DATETIME
Types DATE, TIME, DATETIME are designed to save the date, ...
Data types: binary BLOB data
Data type BLOB - it's almost the same as TEXT. It is designed for storin...
What is SQL
SQL (Structured Query Language) - A structured query language for t...
Creating a Database
In order to create a database, you must use the sentence CREATE DATABASE in which to s...
Creating a table
In order to создать table in the selected database, you must use t...
Mechanisms for saving data
In MySQL, there are several types of engines for different data storage mechanisms. In order to view...
Removing database tables/
To delete tables and databases, use the operator DROP, after which you must specify
Data Insertion: INSERT statement
To populate tables with data, use the sentence INSERT INTO. The general design of the ...
Data retrieval: SELECT statement
In order to obtain a sample of data from a table (tables), the operator SELECT, after ...
WHERE clause: comparison criteria
With the help of the operator WHERE you can specify criteria for retrieving data from ...
Comparison criteria: IN, BETWEEN, LIKE
In this lesson, let us consider the use of operators IN, BETWEEN,
Constructs of the SELECT statement
In this lesson, consider typical queries using SELECT . Псевдонимы по...
Grouping GROUP BY records
Operator GROUP BY It is used to group table records by a specific field or a set of fi...
Aggregate Functions
Агрегатные функции - functions that calculate the value of a group ...
The HAVING statement
Operator HAVING is an analog WHERE, but for groups. Sentence HAVI...
ORDER BY clause
Operator ORDER BY is intended for sorting field values. The basic syntax (taking into ...
LIMIT statement
To control the number of records in the resulting table, use the operator LIMIT. This ...
General SELECT construct
In the previous lessons, we considered operators WHERE, GROUP BY,
Data update: UPDATE statement
To update existing data in the table, use the operator UPDATE. The query also needs to...
Deleting data: DELETE statement
Operator DELETE is used to delete records from a table. As well as for UPDATE
Subqueries
Подзапрос is a query in the query. The subquery is separated by pa...
Editing a table structure
In order to control the structure of the table, it is necessary to use the sentence ALTER TAB...
Creating indexes
To add an index to a table, you must use the operator ALTER TABLE and operator ...
Creating foreign keys
To create a foreign key, we need a second table that will be related in some way to the table
Implementing many-to-many relationships in MySQL
In this lesson, we'll look at working with tables that are linked together many-to-many. Our tables ...
Join tables: fetch from multiple tables
We have two tables - group and student, which are linked together ...
Using JOIN
In the previous lesson, we learned how to join tables simply by specifying the required fields and t...
Using LEFT JOIN/RIGHT JOIN
In the previous lesson, we looked at connecting tables using JOIN. We could make a sel...
Connecting the table with you
In the previous lessons, we looked at the table joins. There is a natural question: can we connect f...
Joining tables UNION
Operator UNION is used to join tables, namely, in order to "draw" one of the resulting...
PHP classes for working with MySQL
To work with MySQL through PHP use special classes. The most common classes for working with MySQL ...
Connecting to MySQL from PHP
In this lesson we will try to connect to the MySQL system from the PHP script. For this we will use ...
Obtaining a selection of data from the database in PHP
In this lesson we will look at getting data from a database in PHP and displaying them on the screen...
Parameter Substitution in Queries
In the previous lesson we considered the method query() to generate a statement on req...