[MySQL self-study road] Day 1 - basic concept terms of database

Table of contents

foreword

Commonly used database noun comparison table

4 basic concepts of database

Two types of data models

Three-level schema structure

Relational and non-relational databases


foreword

Starting today, this series will describe the MySQL learning route from scratch. It will start with the introduction and basic concepts of the database, then describe commonly used SQL statements and some operations unique to MySQL, and finally introduce how to design and apply the database.

If there is something wrong, I hope everyone can leave a message in the comment area for guidance!

Note: The blue background of the blog is the original text of the textbook, the yellow background is the blogger's own understanding, and the green background is the quotation.


Commonly used database noun comparison table

4 basic concepts of database

Data [data]:

Data can be of various types, such as text, graphics, images, audio, video, etc., and stored in the database in these forms.

Database [DB]:

A database is a collection of organized and shareable large amounts of data stored in a computer for a long time. Database data has three basic characteristics of permanent storage, organization and sharing.

Database management system [DBMS]:

A database management system is a layer of data management software that sits between the user and the operating system. The database management system is the basic software of the computer just like the operating system. For example: MySQL, SQL serve and other software.

Database system [DBS]:

A database system is a system that stores, manages, processes, and maintains data consisting of databases, database management systems, applications, and database administrators.

Database systems include not only applications, software, etc., but also the people responsible for maintaining them. It is a man-machine system.

Database Administrator [DBA]


Two types of data models

While constructing the data model, it is beneficial for us to analyze the data and build the database.

Conceptual model:

(1) Entity [Entity]

(2) Attribute 【Attribute】

(3) Code [Key]: a key is an attribute set that can determine a unique entity

(4) Entity type [Entity Type]

(5) Entity set [Emtity Set]

(6) Contact [Relationship]: one-to-one, one-to-many, many-to-many

(7) Representation method: ER diagram (entity-relationship diagram)

Logical model:

  • Hierarchical model: a model in which the data structure is a tree
  • Network model: a model in which the data structure is a graph
  • Relational model: each component of a relationship must be an inseparable data item
  • Object-oriented data model: Like object-oriented thinking, a model built through classes, objects, inheritance, etc.
  • Object Relational Data Model
  • semi-structured data model

Three-level schema structure

The database system is composed of three levels: external schema, schema, and internal schema. 

1. Mode [schema]

        A database has only one schema.

        Mode is a logical structure, not a physical structure, and has nothing to do with data storage, hardware, etc.

2. External schema [external schema]

        Outer patterns may not be unique

        outer mode also called sub mode

        is the data view of the database user

        Is a logical representation of data related to an application

        It can be regarded as a table or view in the database

3. Internal mode [internal schema]

        A database has only one internal schema.

        It belongs to the physical structure.

        It is a description of the physical structure and storage of data, and the way data is organized within the database.

4. Logical independence [external mode/mode image]

5. Physical independence [mode/internal mode image]

        Because there is only one schema and inner schema in a database.


Relational and non-relational databases

Relational database [SQL]:

 Oracle、MySQL、SQL Server、Microsoft Access、DB2 等。

Non-relational database [NoSQL]:

Redis, MongBD, Hbase, CouhDB, etc.

the difference:

The main difference between relational and non-relational databases is the way data is stored. Relational data is inherently tabular and thus stored in rows and columns of a data table. Data tables can be associated with each other and stored collaboratively, and it is also easy to extract data.

In contrast, non-relational data does not fit into rows and columns of tables, but is grouped together in large chunks. Non-relational data is usually stored in datasets, like documents, key-value pairs, or graph structures. Your data and its characteristics are the number one influencing factor in choosing how to store and extract your data.

Note: MySQL is a relational database, so we will expand around relational databases later.

Guess you like

Origin blog.csdn.net/m0_61139217/article/details/128125723