Databases allow not only conveniently placing large amounts of data, but also quickly enough to obtain the desired information. To do this, use a special command called a query.
SQL query
This is a special string reference to the database, which reflects the fields (data particles) and the conditions under which this information must be provided.
The logic of compiling a data request from the database in most programming languages ββis as simple as possible. To obtain information, it is necessary to specify the control system configured for a particular repository, the main six parameters:
- the names of the tables from which data must be taken;
- Fields to return
- relationships between tables;
- sampling conditions (if necessary);
- auxiliary (sorting, presentation methods, restrictions and others).
, , " " . - , , , . SQL- -, .
SQL- , . , , , .
, SQL- . , , , , , .
, SQL-. , . , .
SQL. , - "", 7 - "". , :
SELECT a., a. FROM a, b WHERE a._id = b.id AND (b. = '')
- , . , . .