Database Introduction and Directory

Source: Internet
Author: User
Tags rollback

Database Introduction

DBMS : Database management system

DB : Database

Two-dimensional tabular storage of data (presented by IBM)

RDBMS : relational database management system.

RDB : relational database. a database based on a two-dimensional table for easy management of organizational data

The mainstream relational database management system:

      • Business database (for companies with money, personal free):
        • Oracle : Company: Oracle market share more than 50% (2G) (version has 9i 10g 11g)
        • DB2 : Company: IBM market share less than 20%
        • SQL Server : Company: Microsoft Market share 15%

      • Open source free of charge:
        • MySQL : Company: SUN (the company that produces Java, its servers, operating systems, etc. are mainstream)

(Java is the branch of the industry, then Sun was acquired by Oracle)

Powerful, almost like Oracle, but with little software (50M)

(We'll just have one, this learning is Oracle, the other follow)

RDBMS terminology
    • database: The database is a collection of some associated tables.
    • data table: a table is a matrix of data. Tables in a database look like a simple spreadsheet.
    • columns: a column (the data element) contains the same data, such as the postal code.
    • row: a row (= tuple, or record) is a set of related data, such as a user's subscribed data.
    • Redundancy : stores twice times the data, redundancy can make the system faster. (The higher the degree of normalization of a table, the more the relationship between the table and the tables may often require a connection query between multiple tables, and a connection operation can slow down the query.) For example, the student's information is stored in the student table, and the faculty information is stored in the Department table. An association relationship is established with the Department table by using the dept_id field in the student table. If you want to query the name of a student's department, you must find the student's department number (dept_id) from the student table, and then department find the name of the department based on that number. If you often need to do this, the connection query will waste a lot of time. You can therefore add a redundant field, Dept_name, to the student table, which is used to store the names of the students ' faculties. This will not have to be connected every time. )
    • PRIMARY KEY : The primary key is unique. Only one primary key can be included in a data table. You can use the primary key to query the data.
    • foreign Key: A foreign key is used to correlate two tables.
    • Composite key : Composite key (key combination) Multiple columns are used as an index key, and are typically applied to composite indexes.
    • index: use an index to quickly access specific information in a database table. An index is a structure that sorts the values of one or more columns in a database table. A directory similar to a book.
    • referential integrity: referential integrity requires that references to non-existent entities are not allowed in the relationship. and entity integrity are the integrity constraints that the relational model must satisfy in order to ensure the consistency of the data.
MySQL Database

MySQL is the most popular relational database management system, and in Web applications MySQL is one of the best RDBMS (relational database Management system: relational databases Management systems) application software. Developed by the Swedish MySQL AB company, currently owned by Oracle Corporation. MySQL is an associated database management system that keeps data in separate tables rather than putting all of the data in a large warehouse, which increases speed and increases flexibility.

    • MySQL is open source, so you don't have to pay an extra fee.
    • MySQL supports a large database. You can handle large databases that have thousands records.
    • MySQL uses the standard SQL data language form.
    • MySQL can be allowed on multiple systems and is supported in multiple languages. These programming languages include C, C + +, Python, Java, Perl, PHP, Eiffel, Ruby, and Tcl.
    • MySQL has good support for PHP, which is currently the most popular web development language.
    • MySQL support large database, support 50 million records of Data Warehouse, 32-bit system table file maximum support 4gb,64 bit system to support the largest table file is 8TB.
    • MySQL can be customized, using the GPL protocol, you can modify the source code to develop their own MySQL system.
Database statements

SQL (struct query Language )

    • Select Statement : Query statement (very important)
      • The main keyword: select
    • DDL statement : Data definition statement (define language)
      • CREATE table table name (created)
      • drop table name (delete)
      • ALTER TABLE name (change)
    • DML Statement : Data Manipulation language (statement)
      • Keyword: insert (insert) Delete (delete) update (modify)
    • TCL statement : Transaction control statement (transaction-language)
      • Commit (Submit)
      • Rollback (rollback)
      • SavePoint (save point)
MySQL Installation

Http://www.cnblogs.com/alex3714/articles/5950372.html

SQL statement Usage Description directory

Description: This is my previous study note, which was tested on Oracle, so the following content of the Learning test environment is Oracle, not MySQL. However, these two databases have little or no significant use differences. When I am using MySQL, if I encounter a different place, I will update it in time and identify the description.

    • FROM clause
    • where clause

Database Introduction and Directory

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.