In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Principle and Application Technology of Database
Miao Xuelan, edited by Song Song
Learner: he
◆ Chapter 1 Overview of Database system
Database is a new means and technology of data management.
Information is new and useful facts and knowledge.
> > data (Data) is a physical symbol used to carry information.
Data is not equal to information, data is just one of the ways to express information.
Data processing refers to the collection, organization, arrangement, processing, storage and dissemination of data.
> > data management is the core and foundation of other data processing.
Database (DataBase,DB) is a computer software system that stores and manages data according to data structure.
Data sharing performance of database
The database system should be composed of computer hardware, database, database management system, database application system and database administrator.
The main purpose of database design is to design a good, convenient and efficient database and its application system for a department or organization with the support of database management system.
The database management system mainly provides four functions: data definition, data manipulation, database establishment and maintenance, database operation and management.
> > the data schema of the database consists of three levels of schema: external schema, schema and internal schema.
> > the three-level schema of the database refers to the logical schema, the external schema and the internal schema.
◆ Chapter 2 Information Model and data Model
The core of the database system is the data model
The three worlds of information refer to the real world, the information world and the computer world
> > Information model is a description of the management objects, attributes and connections of the information world.
An object is the result of a set of entities following its entity abstraction
> > Attribute is an abstract representation of some aspect of an entity
Key, also known as keyword, can uniquely identify an entity
The value range of an attribute is called the field of the attribute.
The information model is the modeling of the information world. The information model should be able to describe the basic concepts in the information world comprehensively and accurately.
The data model has three elements: data structure, data operation and integrity constraints.
There are three most commonly used data models in database domain: hierarchical model (Hierarchical Model), mesh model (Network Model) and relational model (Relational Model).
The hierarchical model is the earliest data model in the database system, and the hierarchical database system uses the hierarchical model as the data organization.
> > mesh model: ① has more than one node without parents; ② nodes can have more than one parent
The main advantages of the hierarchical model are: the data model itself is relatively simple, the system performance is better than the relational model and mesh model, and can provide good integrity support. The main disadvantages of the hierarchical model are: when expressing non-hierarchical connections, it can only be solved by redundant data (easy to produce inconsistency) or create unnatural data organization (introducing virtual nodes); there are many restrictions on insert and delete operations; query child nodes must go through parent nodes; because of the tight structure, hierarchical commands tend to be programmed
> > the main advantages of the mesh data model are: it can describe the real world more directly, a node can have multiple parents, compound chains are allowed, it has good performance and high access efficiency. The main disadvantages of the mesh data model are: the structure is complex, and with the expansion of the application environment, the structure of the database becomes more and more complex, which is not easy for users to master; DDL (data definition language) and DML (data manipulation language) are complex, which are not easy for users to use. Because the connection between records is realized through the access path, the application must choose the appropriate access path when accessing the data, so the user must understand the details of the system structure before realizing its data access. Programmers have to set access paths for accessing data, which increases the burden of writing application programs.
Relational operations mainly include data query and insert, delete and modify data.
> > in the physical organization of relational databases, relationships are stored as files
Comparison between relational model and non-relational model
Compared with non-relational data models, relational data models have the following characteristics:
The ① relational data model is based on strict mathematics. The design and optimization of the relationship and its system are guided by mathematical theory, so it is easy to implement and has good performance.
The concept of ② relational data model is simple and easy to understand. In the relational database, no matter the entity or the relation, no matter the original data, the intermediate data or the result data of the operation, all are represented by the relation. This single concept of the data structure unifies the data operation method and makes it easy for users to understand and use.
The access path of the ③ relational data model is hidden from the user. Users operate the data according to the logical mode and sub-pattern of the data, and do not have to care about the physical mode of the data. It is very convenient for both computer professionals and non-computer professionals to use. The independence and security of the data are good.
Data association in ④ relational model is realized by data redundancy. It is impossible to completely eliminate data redundancy in relational databases. Because of data redundancy, the spatial efficiency and time efficiency of the relationship are low.
Object-oriented database system supports object-oriented data model (OO model for short)
An object is a basic unit encapsulated by a set of data structures and operating program code on that set of data structures.
◆ Chapter 3 Database Design methods and examples
The design of database system includes two aspects: database design and database application system design. Database design is to design the structural characteristics of the database, that is, to construct the optimal data model for a specific application environment, and database application system design is to design the behavioral structure characteristics of the database. and establish a functional model that can meet the needs of various users for database applications.
The design of database system includes two aspects: structural characteristic design and behavior characteristic design.
> > the design of database system mainly includes requirement analysis, conceptual design, logical design and physical design.
> > the main contents of database system design are: database structure design, database behavior design, database physical pattern design.
The structural characteristics of the database refer to the logical structural characteristics of the database.
The behavior characteristic design of the database refers to determining the behavior and action of the database user, designing the system hierarchy structure, functional structure and system data flow chart of the database application system, and determining the subschema of the database.
The physical mode design of the database is based on the dynamic characteristics of the database structure (that is, the requirements of database application processing). Under the selected database management system (DBMS) environment, the logical structure model of the database is physically realized, and the storage mode and access method of the database are obtained.
In database system design, structural characteristic design and behavior characteristic design must be combined to achieve its design goal.
> > Database design goes through the following six stages.
① requirements analysis phase
② conceptual structure design phase
③ logical structure design phase
④ physical structure design phase
⑤ database implementation phase
⑥ commissioning and maintenance phase
In the process of database design, you should pay attention to the following problems.
In the ① requirements analysis phase, the central task of the designer is to understand and integrate the application needs of each user.
In the ② conceptual structure design phase, the designer needs to transform the application requirements into an information model that is independent of computer hardware and independent of each database management system product (i.e. Emurr diagram).
In the ③ logical structure design stage, the design work of the logical schema and external schema of the database should be completed, that is, the system designer should first transform the Emure R diagram into the data model supported by the specific database product to form the database logical schema, and then establish the necessary data view according to the requirements of user processing and security considerations to form the external schema of the data.
In the ④ physical structure design stage, the physical storage should be arranged according to the characteristics of the specific database management system and the needs of processing, and the index to be established by the system should be determined to get the internal mode of the database.
> > Information model design is to further abstract the user requirements obtained from the system requirement analysis into the information model structure.
> > the design of the information model can be divided into two steps: the first step is to abstract the data and design the local view; the second step is to integrate the local view to get the global information model.
The three basic methods of data abstraction are classification, aggregation and generalization.
> > there are three main types of conflicts between Emurr graphs: attribute conflicts, naming conflicts and structure conflicts.
Redundant data refers to data that can be exported from basic data, and redundant connections are connections that can be exported by other connections.
> > the conversion process from information model to logical model is divided into three steps:
(1) transform the information model into a general data model.
(2) transform the general data model into the data model supported by the specific DBMS.
(3) it is transformed into an optimized data model by optimization method.
> > the content of physical design of relational database mainly refers to the selection of access method and storage structure, including determining the storage arrangement and storage structure of relationship, index, clustering, log, backup, etc., and determining system configuration.
> > the commonly used access methods of relational database are index method, clustering method and HASH method.
> > to determine the storage location and storage structure of data, three factors should be taken into account: access time, storage space utilization and maintenance cost.
> > the maintenance of the database includes the following 4 items.
1. Dump and restore of database
two。 Security and integrity control of database
3. Supervision, Analysis and Transformation of Database performance
4. Reorganization and Reconstruction of Database
> > Database system is divided into desktop database system, two-tier database system and multi-tier database system.
> > there are three types of DSN: user DSN, system DSN and file DSN. The user DSN is visible only to the user who set it and can only be used on the computer on which it is set. The system DSN is visible to all users in the system. The file DSN is the file that stores the configuration information of the DSN.
The design and implementation of database application system should be divided into requirement analysis, system design, establishment of database, program design and programming and debugging.
> > the steps of database design are: to establish an information model according to system analysis; to transform the information model of the database into a data model; and to standardize the data model to make the data model meet the BC paradigm.
◆ Chapter 4 Relational Model and Relational Operation
Relationships in relational databases can be divided into three types: basic tables, view charts, and query tables.
> > basic tables in relational databases have the following six properties.
(1) the data of the same attribute are homogeneous.
(2) the attribute names of the same relationship cannot be repeated.
(3) the column positions in the relationship are sequentially independent.
(4) the relation has tuple-free redundancy.
(5) the position of tuples in the relationship is sequentially independent.
(6) each component of the relationship must be an inseparable data item.
There are three types of integrity constraints in the relational model: entity integrity, referential integrity, and user-defined integrity.
The operators used in relational algebra include four types: set operators, specialized relational operators, comparison operators, and logical operators.
> > operands, operators and results are the three elements of relational operations.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.