Introduction to Database Concepts

1 Introduction Database

1.1 What is a database

Simply put, database (database) is stored in the data warehouse, the warehouse is in accordance with certain data structure (data structure refers to the link between the organization of data or data) to organize, store, and we can provide through the database a variety of methods to manage the database

1.2 types of database

1.2.1 relational data

Relational database model is the complex data structures comes down to simple binary relationship (ie, two-dimensional table form); typical database: MySQL and Oracle

1.2.2 non-relational databases (NOSQL)

Born in web2.0 (as the main user, uploading and downloading) era, more dynamic applications; traditional relational database in response to web2.0 high concurrency, when demand for high-throughput, more difficult; non-relational databases, also known as as NOSQL database, relational database complements

1.2.3 types of non-relational databases

1.2.3.1 key (Key-Value) stored in the database

a. the key database on a similar hash table traditional language used. You can be added by key, query or delete data, because the use of key primary key access, it will achieve high performance and scalability. Advantages: Simple, easy to deploy, highly concurrent
b typical products:. Memcached, Redis, MemcacheDB, BerkeleyDB

1.2.3.2 storage column (Column-oriented) database

a. The column is stored database data exists aromatic column (column family) in a family of related data stored frequently requested columns together. This part of the data is often used to deal with distributed storage of massive amounts of data. Key still exists, but they are characterized by pointing to a number of columns. These columns are made to the family to arrange
b typical products:. Cassandra, Hbase

1.2.3.3 document-oriented (Document-Oriented) database

a. document-oriented databases store data for a document in the form, each document is self-contained data units, is a set of data items. The same table document properties can be stored in different data can be used such as XML, JSON or JSONB forms of storage
b typical products:. MongoDB, CouchDB

1.2.3.4 Graphics (Graph) database

a. graphical database will allow us to store data intentions. Entity will be as a vertex, and the relationship between the entities will be as side
b typical products:. Neo4J, InfoGrid

1.3 commonly used relational database Products

1.3.1 Oracle Database

Main application areas: the traditional big business, big business, government, finance, securities, etc.

1.3.2 MySQL database

a Features: small size, high speed, low cost of ownership of open source
b main application areas: Internet field, large and small sites, game companies, business platform, etc.

1.3.3 MariaDB database

MariaDB database is a branch of the MySQL database after Oracle's acquisition of MySQL, MySQL will close risky, so the MySQL open source community the branch way to avoid this risk

1.3.4 SQL Server database

. a Microsoft developed large-scale relational database systems
b main application areas: part of the business electricity supplier (CCTV shopping), using the Windows Server platform enterprise

1.3.5 Access database

Microsoft launched the United States in 1994, computer database management systems. It has a friendly interface, easy to use, the development of simple, flexible interface features, is typical of the new generation of the desktop relational database management systems. Safety performance is very general, management or for personal use of small sites

1.3.6 Other less common relational database

DB2、PostgreSQL、Informix、Sybase

1.4 commonly used non-relational database Products

1.4.1 Memcached(Key-Value)

Memcached is an open source, high performance, having distributed memory object caching system. Fast, easy to restart data loss

1.4.2 Redis(Key-Value)

a. Redis Key-Value is a high performance database. Redis data is cached in memory. Redis difference is that will periodically update the data written to disk or to modify the operation of writing the log file append
b Features:

  • Support memory caching, this function is equivalent to memcached
  • Support persistence, this function is equivalent to memcachedb, ttserver
  • Data type richer, stronger than any other library functions Key-Value
  • Support for clusters, distributed
  • Support for special functions such as queue

    1.4.3 MongoDB(Document-oriented)

    a. MongoDB product is interposed between the relational and non-relational databases. Non-relational database among the most feature-rich, like most relational databases. It supports data structure is very loose, the json bjson similar format, it is possible to store more complex data types
    b Features:

  • Very powerful query language
  • Support data indexing
  • Set is stored for easy storage of data object type
  • Free mode
  • Support dynamic query
  • Supports fully indexed, it contains internal objects
  • Support queries
  • Supports replication and failover
  • Practical and efficient binary data storage, including large objects (e.g., video)
  • Automatic processing of debris in order to support the expansion of the cloud level
  • Support RUBY, PYTHON, JAVA, C ++, PHP and other languages
  • File storage format is BSON (one kind of JSON extension)
  • Can be accessed through the network

    1.4.4 Cassandra(Column-oriented)

    a. Cassandra main features it is not a database, a distributed network service but a bunch of database nodes together form. Developed by Facebook, currently 360, Facebook system using this
    characteristic b:

  • distributed
  • Based on the structure of the Column
  • Highly extensible

2 MySQL database concepts

2.1 MySQL database Introduction

a. MySQL database is a popular open source relational database of important product
b. MySQL database is a relational database management system, is characterized by the data stored in different table, these tables into different databases, rather than all in one unified data warehouse fight, this design increases the MySQL read speed, flexible manageability has been greatly improved
c. the most commonly used standardized access and manage MySQL database SQL language is structured query language

2.2 MySQL database advantages Why choose MySQL

a. high performance, service stability, with little downtime abnormal
b. Open Source and free of copyright constraints, low autonomy and cost
c. a long history, and the user community is very active, having trouble, you can seek help
d. software, small size, simple to use and easy to maintain, installation and maintenance costs low
e. brand word of mouth, so that enterprises need to consider the direct use of, LAMP, LNMP popular architecture
f. support multiple operating systems, offers a variety of API interface, support for multiple programming languages, particularly good support for popular PHP language

2.3 MySQL database version Category

. a dual licensing policy, combining commercial version (paid version) and Community Edition
b Alpha version: only run in-house developed, not open to the public
c Beta version: general development and completion of all the tests work after the product, there will be no greater functionality or performance BUG, and an invitation or offer to the user experience and testing
d RC version: before belong to a small production environment release or release candidate version, it is based on the Beta version of the test results, collected information at the BUG or defects to perform a version of the product after the repair and improvement of
e GA version: software products officially released version, also known as the production version of the product. General business will choose the GA version of the MySQL software, for really the production environment

Guess you like

Origin blog.51cto.com/14463906/2424279