SQL-SQL Introduction

A SQL Introduction

SQL (Structured Query Language), structured language semantics, is an ANSI standard computer language for accessing and manipulating the database system ;

Two database Introduction

2.1 Database

We already know the SQL language to operate the database, the database then what is? Database (database) is to save a file container or a group of files ; you might also say do not understand, can be likened to a data library, library with a collection of many books, we can assume that the container database is capable of storing data ; in fact, very common database, you are operating the database every day, such as you see mobile phones, Internet access, micro-channel chat, in fact, behind the operation of the database, just to show the form of operation of the database just not the same;

2.2 database management system

There are a lot of database data, just like there are a lot of books books tube, the book is managed by librarians, then what is it to manage the database? Yes is the database management system (Database Manage System), such as mysql, Access, DB2, Informix, Server, Oracle, Sybase and other database systems;

Table 2.3

Table is a structured file can be used to store particular types of data ; So you may not understand, we give another example, the table like a library book shelves inside, each shelves have put a lot of books; then do not understand it does not matter, you always used it excel, excel table inside the tab (sheet) we can analog data table, the table is stored in certain types of data, like sheet excel; the focus is on the table for each table name is unique and unrepeatable;

2.4 Data Types and

Column is a field in a table, a table by multiple columns; each column by a specific data type, specify the data type can only store data ; do not understand it does not matter, we analogy excel, excel in the sheet is made multiple columns, each column has a designated data types, such as text, numbers, dates, type; the results table with excel database that are similar;

Data type is defined for each column of the table can only store a particular type of data, common data types are integer, numbers, text, strings, date and the like.

2.5 Line

Row is a record in the table , the analogy excel, it is easy to understand;

2.6 Primary

The primary key is to uniquely identify each row, which is characterized by the primary key, can not be empty, can not be repeated, can not be modified ; the primary key analogy we can ID number, and each is unique ID number can not be repeated;

2.7 line number

It refers to the row number in the table row number of each row ;

Here Insert Picture Description

Guess you like

Origin www.cnblogs.com/zszxz/p/12059150.html