MySQL BASICS (1)
Mysql:
Dbs Database System
Bdms Database Management System
Bda Database Administrator
Db database
DBAs operate databases through dbms!
Database Design During software project development cycle
01. Demand analysis stage: Analyze customers' business and data processing needs
02. Summary design phase: design the E-R model diagram of the database to confirm that the requirement information is correct and complete
03. Detailed design stage: review the database structure using the three major paradigms
04. Code Writing Stage: physical implementation database, coding implementation Application
05. software testing stage :......
06. installation and deployment :......
Database design steps:
01. Collect information
02. Identify object
03. Identify the attributes of each object
04. Identify the relationship between entities
E-R Diagram:
01. rectangular entity
02. Elliptical attributes
03. Relationship between diamond and Entity
1: 1: one-to-one
1: N: one-to-many
M: N: many to many
Three paradigms must be met
The first paradigm ensures the atomicity of each column
The second paradigm requires that each table only describe one thing
The third paradigm requires that the columns in the table must be directly related to the primary key and cannot be indirectly related.
SQL statement execution sequence
5. query select
1. Find the table from
2. condition where
3. group
4. Conditional having
6. sort order
7. Paging limit
Database recovery and backup
To ensure account password security, no password can be written in the command, but the "-p" parameter must be available. Press enter and write the password as prompted!
Database Backup
Run cmd to enter the command line
Mysqldump-u username-p Database Name> specified file
Database Restoration
The premise is that you must have a corresponding database.
Mysql-u username-p <specified file
1. mysql is a doscommand
2. Before executing this statement, you must create a new database on the MySQL server. If the restoration process does not exist, an error will occur.
Relational databases and non-relational databases
Log on to mysql
Mysql-h host address-u username-p Password