Basic knowledge of the database

Source: Internet
Author: User

<> Explanatory notes () Supplemental notes or inclusion relationships

1.1

Basic concepts of database (data), Database (DATABASE,DB), Database management system (DBMS)

Data is the base object stored in the database

The three basic features of a database are persistent storage, organized and shareable.

Basic functions of the database management system : ① provides the language of data definition Language,ddl

② data organization, storage, management

③ data manipulation language,dml) such as query, add, delete, change, check

The transaction management and operation management of ④ database is managed and controlled by DBMS,

Ensure the security and integrity of data, and facilitate the recovery after data failure

establishment and maintenance of ⑤ database such as database dump, recovery, reorganization, performance monitoring and analysis

⑥ facilitates interaction and communication with other software

That is, data security protection, integrity check, concurrency control, database recovery.

Database System,dbs Database system is composed of database , database management system, application system, database Administrator (DBA). It is characterized by:

Data structure, high independence, high sharing, easy to expand, low redundancy.

1.2

1.2.1 Data Model is the core and foundation of database system ⑴ divided into two categories : ① conceptual model < real-World abstraction > (Basic Concept: Entity, attribute, code < entity's unique properties >, domain < The value range of the property or the collection of types >, contact ()) means that the method is

                       E-r Chart

                      

② Physical and logical models (① hierarchy model (hierarchical models) ② Relational model (relational model) ③ object-oriented model (object oriented model) ④ objects Relationship model (Ob Ject Relational Model))

⑵ constituent elements : Data structure < object types Description of the nature of the collection model >, data manipulation, data integrity constraints

Relationship terms and tabular data pairs in 1.2.2 Relational model

Relationship terminology Tabular terminology
Relationship Name Table name
Relationship Mode Table header
Relationship A two-dimensional table
Meta-group Record or line
Attribute (name/value) Column (name/value)
Component A column value in a record
Non-canonical relations Table with Table

1.3 Database system Structure

⑴ Internal architecture: three-level mode structure ( external mode n, mode 1, internal mode 1)

Secondary mapping: Out-of-mode /pattern-Image mode describes the data's global logical Structure/external schema describes the local structure of the data: when the pattern changes, simply change the relationship of this mapping to keep the outer mode Change

               Mode/Internal mode when the storage structure of a database changes, changing this mapping allows the application to not change, ensuring data independence

The two-level mapping ensures the stability of the external database mode and ensures the stability of the application .

⑵ External Architecture: Single-User architecture, master-slave architecture, client/server ...

2 relational database

2.1 Basic Concepts

External code < This table is non-main code (attribute), and is another table of the main code >EG students ( School Number , professional number, name) Professional ( Professional number , professional name) student table in the professional number is the foreign key

Properties < can become candidate Code properties >

Main code (code) < generated from candidate code, can uniquely identify a tuple's properties >

The properties in the full Code < table are all codes >

2.2 Relationship Operations

Query (selection, projection, connection, addition, and, difference, intersection, Cartesian product), insert, delete, modify

The basic operations (selection, projection < selection of several columns make up a new relationship >, difference, and Cartesian product)

2.3 Relationship three types of integrity constraints

Entity integrity (primary attribute cannot be empty)

Referential integrity ( the foreign Key's property is either empty or the same as the primary property value of the referenced table )

User-defined Integrity

2.4 Relational Algebra

Complete queries with relational algebra

Basic knowledge of the database

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.