Revisit "Introduction to Database System" [First Basics] [Chapter 1 Introduction]

After a lapse of two years, I revisited the database and once again studied the "Introduction to Database System" by Professor Wang Shan and Sa Shixuan of the National People's Congress. Don't have a taste in my heart. Perhaps this is the perception of the software "no return". Open the textbook again, My memory is still fresh. After I have studied all the professional courses during the university, I looked back at the knowledge I learned the first time, and found that I was much clearer in my heart and understood what I didn't understand in the past. Of course, I didn’t have a good learning method at the beginning, so I now start to take notes and revisit old friends to open a new chapter.

The content of this article is the review notes of the self-study course "Introduction to Database System" by Professor Wang Shan and Sa Shixuan of Renmin University of China. The learning video comes from Xiaopo Station ( portal ), corresponding to video P1-P8, which belongs to the textbook "[First The content of "[Chapter 1 Introduction]".


Insert picture description here


P1 Introduction

1.1 Four big names in the database field-graph winners

Insert picture description here

1.2 The development history of my country's database (seeing, learning, catching up and creating)

Insert picture description here


4 concepts of P2 database

2.1 Data

  • Data is the basic object stored in the database.
  • Symbol records that describe things are called data.
  • The meaning of data is called the semantics of data, and data and its semantics are inseparable.

2.2 Database (Database, DB)

  • A database is a collection of organized and shared large amounts of data stored in the computer for a long time.
  • The data in the database is organized, described, and stored according to a certain data model, with less redundancy, high data independency and scalability, and can be used by various users shared.
  • Three basic characteristics : permanent storage, organized, and shareable

2.3 Database Management System (Database Management System, DBMS)

  • The database management system is a layer of data management software between the user and the operating system.
  • Data definition function: Provide data definition language (Data Definition Language, DLL) to define data objects in the database.
  • Data manipulation function: Provide data manipulation language (Data Manipulation Language, DML), realize the basic operation of the database (check addition, deletion and modification).

2.4 Database System (Database System, DBS)

  • A database system is a system for storing, managing, processing and maintaining data composed of databases, database management systems (and their application development tools), applications, and database administrators (DataBase Administrator, DBA) .
  • The system composition after the introduction of the database into the computer system, the database system is often called the database without causing confusion.

The generation of P3 data technology, the characteristics of the data system

3.1 Three stages of data technology (manual management, file system, database system)

Insert picture description here

3.2 Characteristics of database system

  1. Data structuring
    Realizing the overall data structuring is the essential difference between a database system and a file system.
  2. Data sharing is high, redundancy is low, and easy to expand
    ① Data sharing can greatly reduce data redundancy, save storage space, and avoid incompatibility and inconsistency between data.
    ② Data is oriented to the entire system and is structured data. It can not only be shared and used by multiple applications, but it is also easy to add new applications, making the database system flexible and easy to expand.
  3. High data independence
    ① Physical independence: user's application ↔ physical storage of data in the database
    ② Logical independence: user's application ↔ logical structure of the database
  4. Data is managed and controlled by the database management system
    ① Data security protection
    ② Data integrity check
    ③ Concurrency control
    ④ Database recovery (recover)

P4 conceptual model, the constituent elements of the data model

4.1 The data model is the core and foundation of the database system

  • The data model is also a model, an abstraction of the characteristics of real world data.
  • The data model should meet three requirements:
    ① It can simulate the real world more realistically
    ② It is easy to be understood by people
    ③ It is easy to realize on the computer

4.2 The division of data model

Insert picture description here

4.3 Conceptual model

  • Basic concepts in the information world
    ① Entity [a student, a class, a school...]
    ② Attribute [student ID, name, gender...]
    ③ Key: an attribute that uniquely identifies an entity set. [Student ID]
    ④ Entity Type: Use the entity name and its attribute name set to abstract and describe the same kind of entity, called entity type. [Student (student number, name, gender...)]
    ⑤ Entity Set: The same type of set is called an entity set. [All students]
    ⑥ Relationship: internal connections between entities + connections between entities (1-1, 1-n, mn)
  • A representation method of conceptual model: Entity-Relationship approach, using ER diagram to describe the conceptual model of the real world.

4.4 Elements of the data model

  1. Data structure : describe the constituent objects of the database and the connections between the objects.
  2. Data operation : refers to the set of operations allowed to be performed on the instances (values) of various objects (types) in the database, including operations and related operating rules.
    ① Query
    ② Update (including insert, delete, modify)
  3. Data integrity constraints : a set of integrity rules.

P5 hierarchical model, mesh model

5.1 Commonly used data models

Insert picture description here

5.2 Hierarchical Model

Insert picture description here

  • It is a binary tree , with one and only one node without parent nodes, that is, the root node; nodes other than the root have and only one parent node.
  • The hierarchical model is like an inverted tree, and the parent of the node is unique.
  • Advantages : The hierarchical data structure is relatively simple and clear; the query efficiency is high; it provides good integrity support.
  • Disadvantages : It is difficult to deal with the "many-to-many" relationship in the real world; querying child nodes must be through parent nodes; programming is complicated.

5.3 Mesh model

Insert picture description here

  • More than one node is allowed to have no parents; a node can have more than one parent.
  • Advantages : can more directly describe the real world; has good performance.
  • Disadvantages : The structure is still more complicated; it increases the programming burden.

P6 relationship model

6.1 Data structure of relational model

Insert picture description here

  • Relation: A relationship corresponds to a table.
  • Tuple: A row in the table is a tuple.
  • Attribute (attribute): A column in the table is an attribute.
  • Key: Code key.
  • Domain: similar to dividing the interval.
  • Component: an attribute value in the tuple.
  • Relationship mode: the description of the relationship.

6.2 Manipulation and integrity constraints of relational models

  • Improve the independence of data and greatly improve the productivity for use.
  • The operation object and the operation structure are relations.

6.3 Pros and cons of the relational model

  • Advantages
    ① It is based on strict mathematical concepts;
    ② The concept of the relational model is single, the data structure is simple and clear, and the user is easy to understand and use;
    ③ The storage path is transparent to the user, with higher data independence, security and confidentiality Sex, simplify work.
  • Disadvantages
    ① The query efficiency is often not as good as the formatted data model.

The structure of the P7 database system

Insert picture description here

7.1 Three-level mode

  • Schema (schema): Schema is also called logical mode, which is a description of the logical structure and characteristics of all data in the database, and is a common data view for all users. Core
  • External schema: also known as subschema or user mode. It is a description of the logical structure and characteristics of local data that database users can see and use. It is the data view of database users and is related to a certain application. The logical representation of the data. [ One mode includes multiple external modes ]
  • Internal schema: Also known as storage mode, it is a contempt for the physical structure and storage of data, and the organization of data within the database. [ A database has only one internal mode ]

7.2 The secondary image function and data independence of the database

  • External mode/mode mapping : to ensure the logical independence of data.
    ① Mode changes (such as adding new relationships, new attributes, etc.);
    ② The database administrator makes corresponding changes to each external mode/mode image;
    ③ The external mode can remain unchanged;
    ④ The application program can not be modified (because the application program is It is written according to the external mode of
    the data ); ⑤ The logic independence of the data and the program is guaranteed.
  • Mode/Internal Mode Image : Ensure the physical independence of data.
    ① changes to the database storage structure (e.g., another storage structure selected);
    ② database administrator mode / the mode map change accordingly;
    ③ pattern may remain unchanged;
    ④ can not modify the application;
    ⑤ ensures data The physical independence of the program.

The composition of the P8 database system

8.1 Hardware platform and database

Insert picture description here

8.2 Software

Insert picture description here

8.3 Personnel

Insert picture description here


Guess you like

Origin blog.csdn.net/weixin_44421798/article/details/112425254