A small foundation of relational databases

Source: Internet
Author: User

What is a relational database:

Relational database is based on the relationship model, the relationship model is to save the relationship between entity and entity through the two-dimensional table , so the relational database stores the table composed of rows and columns, each table can be regarded as an entity set, the entity is related, and multiple tables make up the database


Why a relational model is required:

The logical structure of the previous data, hierarchical type, network type, can solve the problem of storage, but the relationship between the hierarchical processing objects is troublesome, the mesh type maintenance is complex, and the query needs to specify the type and path, so there is a relational model


Relational data representation

This is how a file behaves in a Linux file system.

    • Presentation layer: File Form

    • Logical layer: File system (as an intermediate mapping, can be said to be a storage engine, the data block mapped into a file, the file is composed of data blocks)

    • Physical layer: metadata, data block

and the physical layer of relational data is based on the file form

    • Presentation layer: Table

    • Logical layer: Storage engine

    • Physical layer: File (corresponds to the presentation layer of the file representation)

Relational operations

    • Choose

    • Projection

    • Natural connection

    • Cartesian product

    • Set operation

Management of relational databases

relational database management system (Relation databases Management system,RDBMS), such as MySQL, using SQL statements to manipulate the database

Structured Query Language ( Structure Query Language, SQL)


Classification:

    • Data Definition language ( Data Definition Language, DDL), which defines the objects of a relational database: libraries, tables, indexes, views, users, etc.

CREATE ALTER DROP

    • Data Manipulation Language ( Data manipulation Language, DML), the operation of the table, additions and deletions to change

Instert UPDATE DELETE SELECT

    • Data Control language (Language, DCL), permission control

GRANT REVOKE


This article is from the "Call Me boxin" blog, so be sure to keep this source http://boxinknown.blog.51cto.com/10435935/1676163

A small foundation of relational databases

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.