MySQL Learning notes (i)

Source: Internet
Author: User

First, MySQL basic knowledge

    • MySQL is a true multi-user, multi-threaded SQL database server. SQL (Structured Query language) is the most popular and standardized database language in the world. The main goals of MySQL are fast, robust and easy to use.
    • Database Library Management System (DBMS) functions: data definition, database operation, database operation management, data organization, storage and management, database resume and maintenance, other functions .
    • DBMS is generally divided into 3 categories: relational database System (RDMS), Object-oriented database system (OODMS) and Object Relational database System (ORDMS).
    • three-level and two-level mapping of the database (ensures high logical and physical independence of the data in the database): external mode (view layer), conceptual mode (logical layer), and internal mode (physical layer), external mode/ Conceptual pattern Mapping , conceptual mode/internal pattern mapping .

                  

    1. Conceptual mode: is a description of the logical structure and characteristics of all the data in the database, which consists of several concept record types, which involve only the description of the lines, and do not involve the specific values. (The type of a database is a description of the structure and properties of a data, the value is the specific assignment of the type)

    2. External mode: Also known as outdoor mode or sub-mode, is the user and database system interface, is the user to use the part of the data description.
    3. Internal mode: Also known as storage mode, is the description of the data physical structure and storage mode, and is the representation inside the database.
    • The database structure is based on a data model that represents a set of concepts and definitions for the data. The three elements of a data model are the constraints of data structures, data manipulation, and statistics. Common data models are divided into conceptual data models (most notably contact -Entity (E-R) models ) and basic data Models (hierarchical models, mesh models, relational models , and object-oriented models).
    1. The relationship between two different entities in the E-R model (3): A pair of one or one-to-many, many-to-one.

    2. Relational data model is one of the most widely used data models. A relational model is a collection of several relational schemas, a relational pattern equivalent to a record type.

    3. A relational table must conform to certain conditions to become part of the relational model:
      1. The data stored in the cell must be atomic.
      2. The data stored in the column must have the same data type
      3. Each row is unique (no exact same row)
      4. Column has no order
      5. Line no order
      6. The column has a unique name

    • The relevant noun of the relationship: candidate Code (if the value of a property or attribute group of a relationship can only represent a single ancestor), the main code (if a relationship has multiple candidates, select one as the main code), the main attribute (The attributes included in the candidate code are the main attribute), the outer code (a column or set of columns in a table, they exist as primary key in other tables), and the full code (all attribute groups in relational mode are candidates).
    • The integrity constraints of the relationship (to ensure that the user does not break data consistency when modifying the database) fall into three categories: entity integrity, referential integrity, user-defined integrity.

    • Relational algebra Basics (some characters are hard to hit, just before the notes in Word):

MySQL Learning notes (i)

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.