Cow break's [MySQL] Database Introduction

Source: Internet
Author: User
Tags odbc mysql version


According to the Library Foundation


A database (DATABASE,DB) is a repository of data that is organized, stored, and managed according to its structure on a computer's storage device.


What is a database


A database is shared for multiple users, with the smallest possible redundancy, and independent of the application. In simple terms, it can be regarded as electronic file cabinet-the place where electronic files are stored, and users can operate new, intercepted, updated and deleted data in the file.


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 that the user manages the database.


Database application


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


SQL language


SQL, (structured query Language) is a structured query language, and the database management system specifically manages the data in the database through the SQL language and communicates with the database.


Benefits of SQL:
    • SQL is not a proprietary language for a particular database vendor. Almost all important DBMS support SQL, so learning this language enables you to work with almost any database.
    • SQL is easy to learn. Its statements are all composed of highly descriptive English words, and the number of these words is not many.
    • SQL, though seemingly simple, is actually a powerful language with the flexibility to use its language elements for very complex and advanced database operations.

The DBMS-specific sql:sql is not a proprietary language, and there is a standard board that tries to define the SQL syntax that is available to all DBMS, but in fact any two DBMS implementations do not have exactly the same SQL. The SQL in this lesson is specifically for MySQL, although most of the syntax is also applicable to other DBMS, but do not consider these SQL syntax to be fully portable.

SQL provides functionality for database management systems


SQL language is a database query and programming language, which is mainly used for accessing data, querying data, updating data and managing database system. Specifically, the SQL is divided into 4 parts, here is just about to tidy up, detailed later I will be in the SQL related to carefully collation.


    • Data definition Language (LANGUAGE,DDL): DROP, CREATE, Alter, and so on; Database definition language. Primarily used to define databases, tables, views, indexes, triggers, and so on. The CREATE statement is used primarily for creating databases, creating tables, and creating views. The ALTER statement is primarily used to modify the definition of a table and modify the definition of a view. Drop statements are primarily used to delete a database, delete a table, delete a view, and so on.

    • Data manipulation Language,dml: INSERT, UPDATE, DELETE statement, database operation language. Mainly used to insert data, update data, delete data. The INSERT statement is used to insert data, and the UPDATE statement is used to update the data, and the DELETE statement deletes the data.

    • Data Query Language (LANGUAGE,DQL): SELECT statement. Used primarily for querying data.

    • Data Control Language (Language, DCL) statement: Database Control language. Primarily used to control the user's access rights. Where the grant statement is used to add permissions to the user, the REVOKE statement is used to reclaim the user's permissions.

Database classification


The classification of the database can be more, generally we classify two categories, one is called relational database, the other is called non-relational database. If you want to learn more about various concepts, see "Introduction to Database Systems".


relational database


(English: relational database), is to create a relational model based on databases, with the help of Set algebra and other mathematical concepts and methods to process the data in the database. The relationships between the various entities in the real world and the entities are represented by a relational model. The relational model was first proposed by Edgar F. Codd in 1970 and is in line with the "Cod 12 law". Although there are some criticisms of this model today, it is a traditional standard for data storage. Standard data Query Language SQL is a relational database-based language that performs retrieval and manipulation of data in relational databases.


    • Mysql
    • SQL Server
    • Oracle
    • Sybase
    • Wait a minute...


RDBMS: The features of the relational database management system (relational Management Systems):


    1. The data appears in tabular form
    2. Various record names per behavior
    3. The data field corresponding to the record name for each column
    4. A number of rows and columns form a single sheet
    5. A number of forms form database


Almost all database management systems are equipped with an Open Database connectivity (ODBC) driver that enables the integration of each database.


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 NoSQL first appeared in 1998 and is a lightweight, open source, relational database that does not provide SQL functionality developed by Carlo Strozzi. 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 that is developed in 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 API that is written in ANSI C, supports the web, can be persisted in memory, key-value databases, and provides multiple languages. The development work is currently being hosted by VMware. what is MySQL


MySQL (the official pronunciation of English pronunciation:/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 for the SwedishMySQL ABcompany, The company was acquired in 2008 by Sun Microsystems, a solar micro-system. 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.


MySQL Introduction


MySQL has become the most popular open source database in the past due to its high performance, low cost and good reliability, so it is widely used in small and medium-sized websites 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 theMariaDBdatabase. MySQL's founder, Macker Vidnius, founded the branch program MARIADB based on MySQL.


MySQL Development History


Many people think that MySQL is the last 15 years to appear in the database, in fact, the history of the 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 only a short time. 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.


    • In 1985, several 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.
    • In 1996, MySQL 1.0 was released, and it was only for a small set of people, equivalent to internal publishing.
    • In October 1996, MySQL 3.11.1 was released (MySQL does not have a 2.x version) and was initially provided only in a binary version under Solaris. One months later, the Linux version appeared.
    • For 1999-2000 years, MySQL AB was founded 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.
    • In December 2003, MySQL version 5.0 was released, providing 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.
    • MySQL 5.5 was released in December 2010, and its main new features include semi-synchronous replication and support for Signal/resignal's exception handling, and most importantly, the INNODB storage engine has finally become the default storage engine for MySQL today.
    • June 18, 2013, Oracle revised the MySQL license agreement to remove the GPL. But then there was a message that it was a bug.
MySQL version


MySQLFor different users, divided社区版and企业服务器版, also provide some other version, is aMySQLrelated tool.


    1. MySQL Community Server Community version, open source is free, but does not provide official technical support.
    2. MySQL Enterprise Edition is available for a fee and can be tested for 30 days.
    3. MySQL Cluster Cluster Edition, open source free. Several MySQL servers can be packaged as one server.
    4. MySQL Cluster CGE Premium Cluster Edition is subject to a fee.
    5. MySQL Workbench (GUI tool) is a er/database modeling tool designed for MySQL.


The MySQL version of the life mechanism consists of three numbers, such asmysql-5.6.33-osx10.11-x86_64.tar.gz


    • First Number (5) Major version number: When you make incompatible API modifications,
    • Second number (7) Minor version number: When you do backwards-compatible functionality added, total, primary and secondary numbers make up the release serial number. The serial number describes the stable feature set.
    • Third number (1) Revision number: When you make a backward-compatible problem fix. This is an increase in the release of a new bugfix. In most cases, the latest version in a series is the best choice.
Advantages of MySQL
    • Written in C and C + +, and tested with a variety of compilers to ensure the portability of the source code.
    • Supports various operating systems such as AIX, BSDi, FreeBSD, HP-UX, Linux, Mac OS, Novell NetWare, NetBSD, OpenBSD, Os/2 Wrap, Solaris, Windows, and more.
    • Provides APIs for a variety of programming languages. These programming languages include C, C + +, C #, vb.net, Delphi, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl.
    • Support multi-threading, make full use of CPU resources, support multi-user.
    • An improved SQL query algorithm to efficiently improve query speed.
    • It can be run as a standalone application in a client server network environment and embedded in other software as a library.
    • Multi-language support, common encoding such as Chinese GB2312, BIG5 UTF-8, Japanese shift JIS, etc. can be used as the name of the table and the list of numbers.
    • Provides a variety of database connectivity pathways such as TCP/IP, ODBC, and JDBC.
    • Provides management tools for managing, inspecting, and optimizing database operations.
    • You can handle large databases that have thousands records.




How to learn MySQL


How to learn MySQL this is a pseudo-proposition, everyone has a suitable for their own set of learning methods, different, so how to learn MySQL this job, I have no way to tell you, my Learning method is your best way to learn, so before learning MySQL database, you need to find out your own learning The most comfortable posture of MySQL.


Fostering interest and motivation


First of all to cultivate interests, no matter what technology and what knowledge points, interest can greatly improve learning efficiency and provide lasting combat effectiveness. Of course, there is a kind of interest is forced out.


Understanding the Basics


The keywords for SQL statements must be kept in mind (keep in mind the role of keywords and the requirements of using syntax).



The syntax of the SQL statement (commonly used) is not much, the back of a few also remember that, even if you want to go back, the reality will force you to remember (because later on every day to write, evil smile!!!)


Take advantage of good tools


When I was studying painting, the teacher told you the first day to buy a painting pen, gouache, paper, drawing board, support shelves, so that you have a correct painting posture. In fact, the preparation of tools, so not only to install the environment before learning, but also to install a good tool, than the MySQL installation and Visual View Tools (Navicat) is used, using the features of these tools to master SQL statements, manipulate data. In addition to these software tools to make the right and effective use of search engine this good, just start using hundred poison, behind the use of Google (if you have FQ ability to start using Google), you can search caused by a lot of relevant knowledge points.


Multi-hands-on operation


I personally do not like the "armchair", in my study of Java, I always let me look at the bottom of something, I just write an application, I shoulder the mission of work, my purpose hands-on operation, for the database it is particularly strong, if you do not operate, It is difficult to find the problem in the actual application process. You find problems in the actual operation, and solve problems through various methods, so as to improve the operational ability of practical application. In the course of your actual operation to add the basic knowledge in passing.


Record notes


You have the ability to learn quickly and easily, and you have to attach a skill to get a better, faster entry to MySQL database. This skill is to take notes, take notes in my three role: first, avoid forgetting knowledge points. The knowledge point is too many, the knowledge point is cold, is not commonly used also easy to forget; second, the knowledge point is phased thoroughly understand. When you understand more and more of the knowledge points, there are some smattering knowledge points, you need to make some notes, the record after a good time to take these smattering knowledge points thoroughly understand, at each stage to see your notes you will have some different understanding. Third, summarize the precipitation, when you get started to summarize the precipitation is very important, a summary of precipitation is likely in a technical you directly rise a step.



Cow break's [MySQL] Database Introduction


Related Article

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.