What is a relational database:
Relational database is based on the relationship model, the relationship model is to save the relationship between entity and entity through the two-dimensional table , so the relational database stores the table composed of rows and columns, each table can be regarded as an entity set, the entity is related, and multiple tables make up the database
Why a relational model is required:
The logical structure of the previous data, hierarchical type, network type, can solve the problem of storage, but the relationship between the hierarchical processing objects is troublesome, the mesh type maintenance is complex, and the query needs to specify the type and path, so there is a relational model
Relational data representation
This is how a file behaves in a Linux file system.
Presentation layer: File Form
Logical layer: File system (as an intermediate mapping, can be said to be a storage engine, the data block mapped into a file, the file is composed of data blocks)
Physical layer: metadata, data block
and the physical layer of relational data is based on the file form
Presentation layer: Table
Logical layer: Storage engine
Physical layer: File (corresponds to the presentation layer of the file representation)
Relational operations
Choose
Projection
Natural connection
Cartesian product
Set operation
Management of relational databases
relational database management system (Relation databases Management system,RDBMS), such as MySQL, using SQL statements to manipulate the database
Structured Query Language ( Structure Query Language, SQL)
Classification:
Data Definition language ( Data Definition Language, DDL), which defines the objects of a relational database: libraries, tables, indexes, views, users, etc.
CREATE ALTER DROP
Data Manipulation Language ( Data manipulation Language, DML), the operation of the table, additions and deletions to change
Instert UPDATE DELETE SELECT
GRANT REVOKE
This article is from the "Call Me boxin" blog, so be sure to keep this source http://boxinknown.blog.51cto.com/10435935/1676163
A small foundation of relational databases