Basic theory of mysql-relational database
Relational model: (Structured data model)
Relational model
Entity-Relationship Model
Object Relational Model: an object-based data model
Semi-structured data model
Relationships: Relational algebra operations
Intersection:
and set:
Subtraction
Complete:
Complement set:
SQL: Structured Query Language
DML: Data Manipulation language
Insert
Delete
Select
Update
DDL: Data Definition language
Create
Drop
Alter
DCL: Data Control Language
Grant
Revoke
relational database
Presentation layer: Table
Logical layer: Storage engine
Physical Layer: Data file
Data storage and querying
Storage Manager
Permissions and Integrity Manager:
Transaction manager:
File Manager:
Buffer Manager:
Query Manager
DML Interpreter
DDL interpreter
Query execution engine
Relational operations:
Projection: outputs only specified properties
Select: Output only rows that match the criteria
Natural joins: All rows of the same name with the same value on the property
Cartesian product:
(A+B) (c+d) =AC+AD+BC+BD
And:
Rdb object:
Library table indexed view user stored procedure Store function trigger Event Scheduler
Constraints:
Domain constraints: Data type constraints
FOREIGN KEY constraints: referential integrity constraints
PRIMARY KEY constraint: A field can uniquely represent the entity to which this field belongs, and is not allowed to be empty
A table can have only one primary key
Unique key constraint: A field in each row is not allowed to have the same value, can be empty
A table can have more than one unique key
Check constraint: Age:int
Constraint
This article from "Operation and maintenance Growth Road" blog, declined reprint!
MySQL series one relational database theory