3.25 Review of learning
Today, I mainly learned an overview of the database system, some basic commands and data types of MySQL.
1. Overview of the database system
-
Some basic concepts
(1) What is data
? Symbols describing things are called "data", and data is the basic object stored in the database. The symbols that describe things come in many forms, which can be numbers, words, graphics, images, and sounds, but they are all digitized and stored in the computer.
(2) What is a database? A
database can be intuitively understood as a warehouse for storing data. Data is an organized data collection that is stored in the calculator for a long time and can be expressed in multiple forms. Database technology enables data to be organized, described and stored in a certain format, with less redundancy, higher data independence and easy scalability, and can be shared by multiple users.
(3) The composition of the
database system The database system generally consists of a database, a database management system (and its development tools), an application system, a database administrator, and users. -
Basic concepts of MySQL database
(1) Features
(2) Advantages
MySQL is a free software. Anyone can download the software from the official website of MySQL.
MySQL is a true multi-user, multi-threaded SQL database server.
MySQL can process large amounts of data quickly, efficiently and safely. Compared with databases such as Oracle, MySQL is very simple to use. The main goal of MySQL is to be fast, convenient and easy to use.
(3) Commonly used objects in the database
2. Some basic commands and data types of MySQL
- Some basic MySQL commands
(1) Log in to the database
Example: After clicking the XAMPP shell key, enter mysql -uroot -p in the black code box that pops up, press enter, and press enter without entering password.
Among them:
-h: When connecting to the MySQL server on a different host, fill in the host name or address (not filled here because it is on the local host)
-u: username to log in to MySQL
-p: password
(2) Select the default database
use Database;
(3) show all databases
show databases;
(4) show all tables
show tables in the default database ;
(5) give up the command being entered
\c
(6) display the command list
\h
(7) exit the mysq program
\q
( 8) Check the status information of the MSQL server
\s
(9) Create a new database named dang
create database dang;
(10) Before creating the database, determine whether there is a database with the same name
create database if not exists dang
(11) Delete the database
drop database/drop schema database if exists
(12) Fuzzy query the database at the beginning of db_
show databases like'db_%';
…… - type of data