The advent of computer technology in our time marked an informational upheaval in all spheres of human activity. But in order to ensure that all information does not become unnecessary garbage on the global Internet, a database system was invented in which materials are sorted, systematized, as a result of which they are easy to find and submit to subsequent processing. There are three main varieties - distinguish relational, hierarchical, and network databases.
Fundamental models
, , , . , 50, , , . ?
, . . , . , , . . .
1970- . , , , , , - , . ? ( . relatio) . . , . ? , .
, , , , - , , .
, Workbench, PhpMyAdmin, Case Studio, dbForge Studio. SQL-. , .
, ,
- , :
, .
- . , , . . , .
- – , , . .
- - , .
- . . – , .
, , database:
, , , . .
. , . , . . , "", " ". . . – . , . NULL-. . , , – . .
1 | 2 | 3 | 4 | 5 |
_1_1 | _1_2 | _1_3 | _1_4 | _1_5 |
_2_1 | _2_2 | _2_3 | _2_4 | _2_5 |
_3_1 | _3_2 | _3_3 | _3_4 | _3_5 |
SQL . , . – . , .
1. , ( - 1).
2. , 1, (2).
3. , 2, (3 ).
:
2 :
- «-» .
- « », , , , . . « » .
. , primary key. ? – , . , , . , , .
, (foreign key). , . . , 2 : «» «». «» : «ID », «» «». «» , «», «» « ». ID , . «» «» «» , ID «», .
, . «».
"" |
ID | | |
111 | | -41 |
222 | | -72 |
333 | | -41 |
444 | | -72 |
, . "-41", "-72", "", , , . «».
"" |
| | | |
| -41 | 3,0 | 2-27-36 |
| -72 | 3,8 | 2-36-82 |
| -41 | 3,9 | 2-54-78 |
| -72 | 4,7 | 2-65-25 |
, . , . integer, char, vachar, date . "" ID . . , "" , ID . . « ». , . ID- , .