MySQL-MySQL-Other&JDBC-Database 04
Backup
the way:
- Copy physical files directly
- Export in visualizer
- Command line export
Three database paradigms
First normal form:
Atomicity: Ensure that each column cannot be divided
Second normal form:
Each table only describes one thing
Third normal form
Each column of data is directly related to the primary key
Database driven
Driver: sound card, graphics card, database
The program interacts with the database through the database driver
Provides a JDBC unified specification, development only needs to master the operation of the JDBC interface
Nothing can't be solved by adding another layer
java.sql
Database driver package under maven warehouse, mysql-connector-java
Anti-sql injection
Attack the website with SQL statements to get user data
How to prevent: front-end verification, jdbc uses preparedStatement (the parameters passed in are treated as characters instead of SQL statements)