[Introduction to database systems] Introduction ---- introduction to database systems (III) and introduction to Database Systems
1.2.7 Relational Model
Relational model is currently the most important data model.
I. Data Structure of the relational model
A relational model consists of a group of links. The data structure of each link is a standardized two-dimensional table.
Link: A link usually corresponds to a table.
Tuples: a row in the table is a tuple.
Attribute: one column
Code: A Property Group can uniquely identify a tuples.
Field: attribute value range
Component: an attribute value in a tuples.
Link mode: Table model is used to describe the Link name (attribute 1, attribute 2 ,... Attribute n)
The Relationship Model requirements must be standardized, that is, the relationship must meet certain normative requirements (paradigm requirements ).
Ii. Relational Data Model manipulation and integrity constraints
Operations include inserting, deleting, querying, and updating data.
Integrity constraints include: ① entity integrity ② referential integrity ③ User-Defined integrity
The relational model hides the storage path. You only need to specify "what" or "What to find" without detailed instructions.
This greatly improves data independence and user productivity.
Iii. Storage Structure of the relational data model
Some DBMS a table corresponds to a system file, and some DBMS designs tables and creates indexes in several large files.
Iv. Advantages and disadvantages of the relational data model
Advantages: ① different from the formatting model, the relational model is based on a strict mathematical conceptual model.
② Single year-on-year relationship model
③ The storage path is transparent, so as to have higher data independence, better security and confidentiality, and simplify the work and data of programmers.
Database development and establishment
Disadvantage: the query efficiency is inferior to the formatting data model, and the DBMS design is difficult.
1.3 Database System Structure 1.3.1 concept of Database System Mode
The concept of type and value: type refers to the description of the structure and attribute of a type of data. A value is a specific value assignment.
Mode: Describes the logical structure and features of all data in the database, not only the type description, but also the specific value.
A specific value of the mode is called an instance of the mode.
1.3.2 three-level schema of the Database System
The three-level mode structure of the database refers to that the database system is composed of three levels: external mode, mode, and internal mode.
I. mode (logical mode)
It is the feature description of the logical structure of all data in the database, and is the public data view of all users.
A database has only one logic mode.
Ii. External mode (submode & User Mode)
It is a description of the local data logic and features that can be seen and used by database users (including programmers and end users,
It is the data view of database users and the logical representation of data related to an application.
Iii. Internal Mode (storage mode)
It is the description of the physical structure and storage method of data, and the representation of data in the database.
1.3.3 database secondary image function and Data independence
The database management system provides two layers of images between the three modes:
External mode/mode image
Mode/internal mode image
These two layers of images ensure that the data in the database system has high logical and physical independence.
I. External mode/mode image
The Mode describes the global logical structure of the data, while the external mode is the local logical structure of the data.
Ii. mode/internal mode image
When the storage structure of the database changes, the database administrator changes the mode/internal mode image, so that the mode remains unchanged.
As a result, applications do not need to be changed, ensuring the physical independence of data and data, referred to as the physical independence of data.
In the three-level mode structure, the global logical structure is the center and key of the database, which is independent of other layers of the database. Set
The primary task of database computing is to first determine the logical structure of the database.
1.4 composition of database system 1. hardware platform and database
Requirements: memory is large enough, memory is large enough for external storage devices, good channel performance
Ii. Software
(1) DBMS. DBMS is a system software designed for the establishment, use, and maintenance of databases.
(2) operating systems supporting DBMS operation
(3) Advanced languages with database interfaces and their compilation systems, facilitating application development.
(4) application development tools with DBMS as the core
(5) database application systems developed for specific application environments
3. Personnel
1. Database Administrator
Determine the information content and structure in the database
Determines the storage structure and access policy in the database
Define data security requirements and integrity constraints
Monitor database usage and Operation
Database improvement and restructuring
2. system analysts and database designers
The system analyst is responsible for application requirement analysis and Specification Description, and should be combined with users and DBAs,
Determine the software configuration of the system and participate in the outline design of the database system.
The Database Designer is responsible for determining the data in the database and designing the modes at all levels of the database.
DBA.
3. Application programmers
4. User
Database access interfaces include browsers, menu drivers, table operations, graphic display, and report writing.
(1) Accidental user
(2) simple users
(3) complex users
The first one is over. I will briefly introduce what is the database and the type of the database.
Starting from the next chapter, we will learn the key relational databases in this book.