MySQL table operations (Basic)

Source: Internet
Author: User
Tags mysql in

1, the database (DATABASE,DB) is to organize, store and manage data according to the structure, and is a warehouse built on the computer storage device.

2. What is a database: (the warehouse used to store the data)

Database:

The database is stored in the Data warehouse, but this warehouse is in the computer storage device, and the data is stored in a certain format in the past people will be stored in the file cabinet, the data is now large, no longer applicable to the database is long-term storage in the computer, organized, shareable data can be. The data in the database is organized, described and stored according to a certain data model, with small redundancy, high data independence and extensibility, and can be shared for various users.
View Code

3.

Database system: The database system has 3 main components.

Database

Database System: The place where data is stored.

Database management System

Database Management System,dbms: The software used to administer the database.

Database application

Database application: A software supplement to the management database used to improve the processing power of the database system.

4 The relationship between database servers, data management systems, databases, tables and records (key

Entries: 1 li poetry 963852741 (information in multiple fields forms a record, that is, a row in a file) Table: student,school,class_list (i.e. file) database: Oldboy_ Stu (i.e. folder) database management system: such as MySQL (is a software) database server: A computer (high memory requirements) Summary:    database server-: Run database management software    database management software: Management-Database    database: That is, the folder, Used to organize files/tables    : That is, files that are used to hold multiple lines of content/Multiple records

5. The development process of database management technology (understanding)

a human management stage before the mid 1950s, the computer was mainly used for scientific calculation. At that time hardware level: external memory only paper tape, cards, tapes, no disk, such as direct access to the storage device at the time of the software condition: No operating system, no management data software, the data processing method is batch processing. Manual management of data has the following characteristics:1 data is not saved: The computer is mainly used for scientific calculation, data temporary, temporary input, do not save 2 application Management data: Data to be managed by the application, the application needs to process the logical + physical structure of the data , The development burden is very heavy 3 data is not shared: a set of data corresponding to a program, multiple programs involving the same data, must be defined, resulting in a large number of data redundancy 4 data is not independent: the logical structure of the data or the physical structure of the change, The application must be modified accordingly, and the development burden is further increased

two file system phase the 1950s to 60 hardware level: With a disk, drum and other directly accessible storage device software level: With the operating system, and the operating system has a dedicated data management software, namely the file system, processing methods not only have batch processing, and the ability to deal with file system Management data online in real time has the following advantages:1 data can be stored for a long time: The computer is used for data processing, so the data need to be saved for a long time, and the Operation 2 is  managed by the file system: File system this software, The data is organized into a relatively independent data file, accessed by file name and by record. The structure within the record is realized, but the whole is unstructured. and the conversion between the program and the data by the file system provides the access method, is the application and the data has the certain independence, the programmer may not need to consider the physical detail too much. File System Management data has the following disadvantages:1 poor data sharing, redundancy: a file corresponding to an application, different applications have the same data, they must also establish their own files, can not share the same data, resulting in data redundancy, waste space, and the same data repeat storage, the respective management, Easy to cause data inconsistency 2 data independence is poor: once the logical structure of the data changes, the application must be modified to modify the definition of the file structure. Changes to the application will also cause changes in the data structure of the file. Therefore, there is a lack of independence between data and procedures. As can be seen, the file system is still a non-resilient, unstructured collection of data that is isolated between files and does not reflect the memory connection between things in the real world. 


Three-Data system stage since the late the 1960s, the scale of computer Management is increasing, the application is more and more extensive, the data volume is growing rapidly, and multiple applications, multi-languages sharing data with each other more and more demanding hardware level: with large capacity disk, Hardware architecture down software level: Software price rise (development efficiency must be improved, the programmer must be freed from data management), distributed concept prevails.  Database system Features:1 data structure (such as Odboy_stu)2 sharing, low redundancy, easy to expand 3 Data Independence High 4 data is managed and controlled by DBMS A: Data security protection B: Data integrity check C: Concurrency control D: Database recovery

6. Unified character encoding

#1. Modify the configuration file[Mysqld]default-character-set=UTF8 [Client]default-character-set=UTF8 [Mysql]default-character-set=UTF8#mysql5.5 Above: Modification method has changed[Mysqld]character-set-server=utf8collation-server=Utf8_general_ci[client]default-character-set=Utf8[mysql]default-character-set=UTF8#2. Restart the service#3. View the results of the changes:\sshow variables like'%char%'
Unified character Encoding

7, the advantages of the database:

Advantage

8. Database classification

In general, we classify two categories, called relational database, the other is called non-relational database relational database:           MySQL, Oracle, SPL, Server, DB2, Sybase non-relational database:          Redis, MongoDB
Database Classification
RDBMS: The relational database Management system features:    data appears in tabular format    each record name    corresponds to the data field    for each record name Many of the rows and columns make up a form    that forms several forms of the database
View Code

9. Data Sheet

Relational database does not have a data table, keywords, primary keys, indexes and so on can not be discussed, the data table is a relational database is a very important object, is the basis of other objects, but also a series of two-dimensional array of arrays, used to store and manipulate the logical structure of the data. According to the classification of information. A database may contain several data tables, each table is composed of rows and columns, record a data table to add a row, each column consists of a field name and a collection of field data, the column is called a field, each column also has its own multiple properties, such as whether to allow null, default value, length, type, storage encoding, annotations, etc.

Non-relational database (NoSQL)

The term first appeared in 1998 as a lightweight, open-source relational database developed by Carlo Strozzi that does not provide SQL functionality. Today's typical relational databases exhibit poor performance in some data-sensitive applications, such as creating indexes for huge volumes of documents, Web services for high-traffic websites, and sending streaming media. A typical implementation of a relational database is tuned to perform transactions that are small, read-write frequently, or have very few write-accesses in large batches.    MongoDB MongoDB is a high-performance, open-source, modeless document-based database, and the development language is C+ +. It can be used in many scenarios to replace the traditional relational database or key/ value storage methods.    Redis Redis is an open source, written in ANSI C language, supports the network, can be memory-based and persistent log-type, Key-value database, and provides a variety of language APIs. The development work is currently being hosted by VMware.
NoSQL

Myssql's Journey:

MySQL (Official pronunciation in English:/ma??? Skju??? L/my S-q-l, but also often read as English pronunciation:/ma?? si?kw?l/my Sequel) was originally an open source relational database management system (DBMS), the original developer of Sweden's MySQL AB, the company was introduced in 2008 by the Yang Micro-system (sun Microsystems) acquisitions. In 2009, Oracle (Oracle) acquired Sun Micro Systems, and MySQL became a product of Oracle's. In this tutorial, you'll get a quick grasp of MySQL basics and easy access to MySQL database.
Black history
MySQL introduced MySQL in the past because of high performance, low cost, good reliability, has become the most popular open source database, so it is widely used in small and medium-sized web sites on the Internet. is the most popular relational database management system, MySQL is one of the best RDBMS (relational database Management system: relational databases Management systems) application software in Web application. As MySQL matures, it is increasingly used for more large-scale websites and applications such as Wikipedia, Google and Facebook. Oracle, however, has sharply increased the price of the MySQL commercial version after it was acquired by Oracle, and Oracle no longer supports the development of another free software project, opens Olaris, As a result, the free software community has some concerns about whether Oracle will continue to support MySQL Community Edition (the only free version of MySQL), so some of the original open source software that uses MySQL is moving to other databases. For example, Wikipedia was formally announced in 2013 to migrate from MySQL to the MARIADB database. MySQL's founder, Macker Vidnius, founded the branch program MARIADB based on MySQL.
Introduction
MySQL Development history Many people think that MySQL is the last 15 years to appear in the database, in fact, the history of MySQL database can be traced back to 1979, when Bill Gates dropped out of a long time, Microsoft has just started, And Larry's Oracle company was founded soon.    There was a genius programmer Monty Widenius designed a reporting tool with BASIC, and later used the tool in C to rewrite it until the UNIX platform was just a low-level, report-oriented storage engine called Unireg. 1985several like-minded lads in Sweden (David Axmark, Allan Larsson and Monty Widenius) set up a company that was the predecessor of MySQL AB. In 1990, TCX's customers began asking for SQL support for his API. It was proposed to use commercial databases directly, but Monty felt that the speed of commercial databases was unsatisfactory. As a result, he uses the mSQL code directly to integrate it into its own storage engine.    Disappointingly, the effect was not very satisfying, so Monty ambitious and determined to rewrite a SQL support. 1996, MySQL1. 0 released, it is only for a small set of people, equivalent to internal publishing. October 1996, MySQL3.11. 1 release (MySQL does not have a 2.x version), only the binary version under Solaris is available at the beginning.    One months later, the Linux version appeared. 1999~2000, the MySQL AB Company was established in Sweden.    Monty hired several people to work with Sleepycat to develop the Berkeley DB engine because BDB supports transactional processing, so MySQL has since started supporting transactions. December 2003, MySQL5the. 0 Release provides features such as views, stored procedures, and so on.    January 16, 2008, Sun (Solar micro System) formally acquired MySQL.    On April 20, 2009, Oracle announced the acquisition of Sun computers at $9.50 a share and a total of $7.4 billion. December 2010, MySQL5.5 release, its main new features include semi-synchronous replication and the signal/Resignal's exception handling capabilities, and most importantly, the INNODB storage engine has finally become the current MySQL default storage engine. June 18, 2013, Oracle revised the MySQL license agreement to remove the GPL. But then there was a message that it was a bug. 
Black History

MySQL table operations (Basic)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.