(ii) Basic terminology of the database

Source: Internet
Author: User

1. Database

As the name implies, database DB refers to the warehouse where the data is stored, except that the warehouse is located on the computer's storage device. Typically, this data is intended for an organization, department, or Enterprise, which is a set of related data that is stored on storage in accordance with a certain data organization model. For example, Student achievement management system, students ' basic information, student status information, performance information are from the student performance management database in addition to the data that users can directly use, there is another kind of data. They are defined information about the database, such as the name of the database, the definition of the data table, the database account, permissions, and so on. These data users are not used frequently, but are very important to the database. This data is usually stored in a "data dictionary (datadictionary)". Data dictionary is the basis of the work of database management system, the database management system uses data dictionary to understand the organization of data in database, and completes the management and maintenance of data in database. Database users can obtain useful information through a data dictionary, such as which database objects the user has created, how those objects are defined, which users are allowed to use them, and so on. However, database users are not allowed to arbitrarily alter the contents of the data dictionary.

Tip: A data dictionary is one of the most important components of a database management system, which is a set of tables and views that are automatically generated and maintained by the database management system. In the past, people just kept the data in a file cabinet, and when the data grew, It is difficult to find data from a large number of files. Today, people use computers and databases to scientifically store and manage large amounts of complex data, first to collect and extract the large amounts of data to be applied, and then save and further query and process them for more useful information. As a result, a database is an organized, large, shareable collection of data that is stored in a computer for long periods of time. The data in the database is organized, described and stored according to a certain data model, which has small redundancy, high data independence and expansibility, and can be shared for various users.

2. Database management System

After the database has been established, the database management system (database Management systems. DBMS) implements various management and manipulation of data in the database, organizes and stores data scientifically, efficiently obtains and maintains data, completes the establishment of user accounts and assigns permissions, and provides users with various operational functions. Database management System (DBMS) refers to the software system of data management in database system, which is the core part of database system, and all operation of database system, including query, update and various control, are carried out through DBMS. DBMS is always based on the data model, so it can be seen as a specific implementation of a data model on a computer system. According to the data model used, DBMS can be divided into network type, hierarchical type, relational type, object-oriented type and so on. But in different computer systems, because of the lack of uniform standards, even the same data model DBMS, they are in the user interface, system functions and other aspects of the different relational DBMS is the most popular DBMS, common such as Oracle, MS SQL Server, DB2 etc. if the user wants to operate the database, the DBMS takes the operation from the application to the outside ministerial, the conceptual level, and then directs the internal level, thus manipulating the data in the memory. The primary goal of a DBMS is to make the data available as a manageable resource. DBMS should make data easy for a variety of users to share, should improve the security, integrity and availability of data, and provide a high degree of data independence.

3 Database System

A database System (Databasesystem, DBS) is a system that introduces a database into a computer system, typically consisting of a database, a database management system (and its development tools), an application system, and a database administrator, as shown in 1.1. It is important to note that the establishment, use and maintenance of the database is not enough to rely on a single DBMS, but also to have specialized personnel to complete, these people are called Database administrator (Dawbaseadministrator. DBA)

Figure 1.1 Database System

Usually, in the case of confusion, the database system is referred to as the database. The database system is in the status of computer systems 1.2. The composition of database system includes hardware platform, database, software system, application system and related personnel.


Figure 12 The status of the database in the computer system

3.1. Hardware platform and database


Hardware system mainly refers to the various components of the computer. In view of the requirements of the database application system, especially the database host or database server external memory to be large enough, v0 access efficiency is high, the host's throughput is large, the job processing ability to be strong. For distributed databases, the computer network is also the basic environment, and its specific description is as follows:

    • To have large enough memory, store the operating system and DBMS core modules, database buffers, and applications.
    • There is a large enough disk and other direct access device storage database, there is enough CD, disk, tape and other media as the data.
    • The network that is required to connect to the system has a higher data rate.
    • Have a strong processing capacity of the central processing unit (CPU) to ensure the speed of data processing.
3.2. Software

Database system software requirements, mainly include the following aspects:

    • Dbms. A DBMS is a software configured for the establishment, use, and maintenance of a database.
    • Supports the operating system that the DBMS is running.
    • High-level programming language and compiling system for communication with database
    • A database application system developed for a specific application environment.

3.3. Database administrators and related personnel

Database personnel include database administrators, system analysts, application programmers, and ordinary users whose respective responsibilities are as follows:
(I) database administrator
The database administrator (DBA) is responsible for managing and monitoring the database system and is responsible for resolving system problems in the application for the user. In order to ensure that the database can run efficiently and normally. Large database systems are staffed with dedicated personnel responsible for the management and maintenance of database systems. The database administrator plays a very important role in the normal operation of the database management system. Its main responsibilities are as follows:


Determine the content and structure of the information in the database. The DBA is involved in making decisions about what information is stored in the database. Therefore, DBAs must participate in the whole process of database design and work closely with users, application programmers and system analysts to design the database.
. Determines the storage structure and access policies of the database.
Monitoring database operation (System operation is normal, system efficiency), timely processing of the database system during the operation of the problems. For example, in the event of a system failure, the database is compromised and the DBA must restore the database to the correct state in the shortest time possible.
Security management, through the system's permission settings, Integrity control settings to ensure the security of the system. The DBA is responsible for determining the access rights of each user to the database, the confidentiality level of the data, and the integrity constraints.
Routine maintenance, such as regular backup of data in the database, maintenance of log files, etc.
Manage database-related documents.


(2) System analyst and Database Designer
The system analyst is responsible for the application system requirements analysis and specification, and with the user and DBA, to determine the system hardware, software configuration, and participate in the database system summary design.
(3) Application programmer
The application programmer is the software programmers responsible for designing and developing the functional modules of the application system, who write specific applications based on the database structure. and to debug and install
(4) User
The user here refers to the end user. The end user uses the database through the user interface of the application. Common interface methods are browser, menu driver, table operation, graphical display, report, etc.

4 Database Schema

The database system structure is a general framework of the database. Although the actual database system software products are diverse. Support for different data types. Using different database languages, built on different operating systems, but the vast majority of database systems have a three-level pattern on the overall architecture the three-level model of the Learning database will help to understand some basic concepts in database design and application.


Three-level mode for 4.1 databases

The three-level model of the database is divided into outer mode, conceptual mode and internal mode, and 1.3 shows


Figure 13 Database system architecture-level Three mode


(1) Conceptual mode


Conceptual mode, also known as schema, is a description of the logical structure of global data in a database, and is a public view of all users. This description is an abstract description, does not involve the specific hardware environment and platform, but also with the specific software environment-independent conceptual pattern mainly describes the data of the concept of record types and their relationships, but also includes some semantic constraints between the data,
The description of it can be defined by the DDL in the DBMS.


(2) External mode (External schema)


External mode, also known as sub-mode (subschema) or user mode, is a description of the logical structure and characteristics of local data that database users (including application and end users) can see and use, a data view of the database user, and a logical representation of the data associated with an application. The outer mode is usually a subset of the pattern. A pattern can have multiple external modes. Because it is a data view of individual users, if different users in the application needs, the way of looking at data, the requirements of data confidentiality, such as the difference in length, confidentiality level, etc. can be different. In addition, the same out-of-the-way mode can be used by multiple application systems for a single user, but only one external mode is used by an application.
The DBMS provides a sub-schema Data Description Language (sub-schema DDL) to strictly define the format.

Hint: The external mode is a powerful measure to ensure the security of the database. The data in the external schema should not be visible to other data in the database.

(3) Internal mode (Intemal schema)


Each user can only see and access the internal mode, also known as the storage mode (Storage Schema). Description of structure and storage how to control the details. A pattern has only one inner mode. It is the data physics definition of all internal record types, the organization of indexes and files, and the data internal records are not related to physical records, nor to device constraints. The software mechanisms that are stored and accessed are part of the operating system, the file system. Operations to disk, and so on. The inner mode is strictly defined within the Mode Data Description Language (internal mode DDL) that is closer to the physical storage, such as from disk read data or write data DBMS.

4.2. Two-level image of the database

There is a big difference between the pattern of the database system, the internal mode, and the external mode, in order to achieve transparency between the user and the data, the DBMS provides a two-layer image of the external mode/pattern image and the mode/internal mode image. With these two layers of images, users can process the data logically and abstractly, without having to care about how the data is represented and stored in the computer. It is these two layers of images that ensure that the data in the database system can have high logical independence and physical independence.

Tip: An image is essentially a correspondence relationship, which refers to how the image is double-rolled and defines the transformation rules. This enables data independence to be guaranteed.

(1) External mode/mode image


Each external mode of the database has an external mode/pattern image, which defines the corresponding relationship between the external pattern and the pattern, and the external mode Factory mode image is generally in the external mode.


The schema describes the global logical structure of the data, which describes the local logical structure of the data corresponding to the same pattern can have any number of external modes. For each external mode, the schema image, which defines the description of the corresponding relationship between the outer pattern and the pattern. The database system has an external mode/These images are usually included in the respective external mode if the pattern needs to be modified, data types such as data redefinition, add new relationships, new attributes, Changing attributes then you simply modify the image of each outer mode/pattern so that the outer mode is as constant as possible, and the application is generally written in the outer mode, so the application does not have to modify the logical independence of the data and the program.


(2) mode/internal mode image


This ensures that the number mode/internal mode image is unique because the database has only one mode and internal mode. It exists between the pattern and the inner mode, because the data structure between the level two patterns may be inconsistent, and may even vary greatly. The pattern/inner mode image defines the correspondence between the pattern and the internal pattern, that is, the correspondence between the global logical structure of the data and the storage structure. The pattern/internal mode image is typically described in the pattern. When the storage structure of a database changes, the schema/internal mode image is changed by the database administrator, so that the schema remains the same, so that the application does not have to change. This guarantees the physical independence of the data and the program. The physical independence of the data. In the three-level schema structure of the database, the database schema, the global logical structure, is the center and key of the database, which is independent of the other layers of the database. Therefore, the logical schema of the database should be determined first when designing the database schema structure.

The inside of the database relies on its global logical structure, but the database-independent user view is out-of-the-box mode and is independent of the specific storage device. It is the data structure defined in the global logical structure and its relations are organized according to a certain physical storage strategy, in order to achieve better time and space efficiency.

The external schema of the database is for a specific application, which is defined on a logical mode, but is independent of the storage mode and storage device. When the application requirements change greatly, the corresponding external mode can not meet its view requirements, the external model has to make corresponding changes, so the design of the external mode should take into account the expansion of the application. A particular application is compiled on the data structure described in the external schema, and it relies on a specific external pattern, independent of the schema and storage structure of the database.

Note: Different applications can sometimes share a two-level image of the same out-of-mode database to ensure the stability of the out-of-database model, thus guaranteeing the stability of the application from the bottom up, unless the application requirements themselves change, otherwise the application generally does not need to be modified.

The independence between the data and the program, so that the definition and description of the data can be separated from the application. In addition, because the data access is managed by the DBMS, the user does not have to consider the details of the access path, which simplifies the development of the application and greatly reduces the maintenance and modification of the application.


5. Data Model


Model is the simulation and abstraction of real-world characteristics such as a set of architectural planning sand table, exquisite realistic aircraft model, are the real life of the description and abstraction of things, see it will let people associate with the real world in kind. The data model is also a model, Its database is used to provide a formal framework for information representation and manipulation, and is a tool used in the database to abstract the real world. Because the computer cannot directly deal with the concrete things in the real world, people must first transform the concrete things into the data that can be processed by the computer, that is, to digitize, to use the tool of data and chess in the real world to abstract, Presentation and processing. The data model is divided into 3 types according to different application levels, namely the conceptual data Model (conceptual Datamodel), the logical data pattern (Logicdata model) and the physical data Model (physical).


1. Conceptual Data Model


Conceptual data model, also known as conceptual model, is an objective-oriented, user-oriented model, independent of the specific database management system and independent of the specific computer platform. People usually first abstract the real world into the information world, establish the so-called "conceptual model", and then map the model of the information world to the machine world, and transform the conceptual model into a model in the computer world. Therefore, the conceptual model is an intermediate level from the real world to the machine world.


2. Logical Data Model


Logical data model, also known as logical model, is a model for database system, which is the intermediate level between conceptual model and computer. Concept chess types can be represented in a database only after they are converted to a logical model. At present, there are many kinds of logical chess types. The more mature include hierarchical model, relational model, net model, object-oriented model and so on.


The fundamental difference between the above 4 data models is that the data structure is different, that is, the representation of the relationship between the two different, the specific description is as follows:

    • Hierarchical models use "tree structure" to represent the connection between data.
    • The relational model uses a "two-dimensional table" to represent the connection between data.
    • The mesh model uses "graph structure" to represent the connection between data.
    • The object-oriented model uses "objects" to represent the connection between data.
3. Physical Data Model


The physical data model is also called the physical model, and the model is represented on the computer physical structure. In general, the data model consists of three major elements of the structure and type.

6. Data integrity constraints


It is a computer-oriented physical representation of the model, which is the data manipulation and integrity constraints of three parts, which is also known as data Model data integrity constraints is a data description of some constraints, the relational data model can have three types of integrity constraints entity integrity, referential integrity and user-defined integrity.

1. Physical integrity (Entity Integrity)


A basic relationship usually corresponds to an entity set in the real world. For example the student relationship corresponds to the collection of students in the real world entities are distinguishable, that is, they have some kind of uniqueness identity. Accordingly, the primary code is identified as the uniqueness in the relational model. The attribute in the main code is the primary attribute and cannot be null. The so-called null value refers to the "meaningless" value. If the main attribute takes a null value, it indicates that there is an entity that is not identifiable, that is, there is an indistinguishable entity, which contradicts the real-world application environment, so this entity must not be a complete entity. Entity integrity rules: If attribute A is the primary attribute of the basic relationship r, property A cannot take a null value.


2. Referential integrity (referential work ntegrity)


There is often a connection between entities in the real world, and relationships between entities and entities in a relational model are described in relation to each other. There is a natural reference between relationships and relationships. Set F is one or a set of properties of the basic relationship r, but not the code of the relationship R, if f corresponds to the main code KS of the basic relationship S, then the F is the outer code of the basic relationship R (Foreign key), and the basic relation R is the reference relationship (referencing relation), The basic relationship S is the referenced relationship (referenced relation) or the target relation. Relationships R and S are not necessarily different relationships. Referential integrity rules define the rules of reference between the outer code and the main code. The referential integrity rules are described as follows:
If the attribute (or attribute group) f is the outer code of the basic relationship R, it corresponds to the main code KS of the basic relationship s (the basic relationship R and 5 are not necessarily different relationships). The value for each tuple on F in R must be a null value ((each property value of f is null), or is equal to the primary code value of a tuple in s
Example 1.11 The following scenarios illustrate how referential integrity rules are implemented in relationships. There are two relationship patterns in the relational database: s (student number, name, gender, age, class number, department), PK (student number) learning Relationship chess: SC (student number, course number. Score), PK (school number, course number), FKI (school number), FK2 (course number) according to the rules, the "number" value in SC should appear in the relationship s. If there is a tuple (s07,c04,80) in the relationship SC, and the number S07 is not found in the relationship s, then it is considered that a non-existent student entity is referenced in the relational SC, which violates the referential integrity rule. In addition, in the relationship SC, the "learning number" is not only a foreign key, but also a part of the primary key, so here the "number" value is not allowed to be empty.

3. User-defined integrity (user-defined Integrity)


Entity integrity and referential integrity apply to any relational database system. In addition, different relational database systems, depending on their application environment, often require some special constraint conditions. User-defined integrity is a constraint on a specific relational database that reflects the semantic requirements that the data involved in a particular application must meet. The relational model should provide a mechanism for defining and verifying such integrity in order to process them in a unified system approach, rather than application-borne functionality.
"Example 1.2] Example 1 of the student relationship Model S, the student's age is defined as two-bit integers, but the scope is also very large, for this user can write the following rules to limit the age between 15--30 years:
CHECK (age between and 30)


7. Online transaction processing and online analytical processing


Online transaction processing (online Transaction processing. OLTP) is the application of database application system, which is mainly used to complete the business processing of database application system. OLTP is the first and most urgent requirement in the development of database application system, which can directly replace manual labor and greatly improve work efficiency. Its application needs drive the database technology, especially the development of relational database, and the latter provide strong support for it. The maturity of the OLTP system, on the one hand, in the study of data processing technology can also bring about what, on the other hand, the large amount of data produced by OLTP, Dr E.f.codd presented the concept of online analytical processing (oalineanalytical processing, OLAP). OL person P is a software technology that enables analysts, managers, and executives to quickly, consistently and interactively observe information from all aspects in order to achieve an in-depth understanding of the data. This information is converted from the original data in the OLTP system, and according to the user's understanding, it reflects the real aspects of the user's environment, and provides the reference and basis for middle-level leaders and senior decision-making.
Tip: Online transaction processing and online analysis processing represent two levels of data processing technology and a sense of application:
Online transaction processing improves efficiency and quality of work, and on-line analytical processing comprehensively, realistically and intuitively reflects all aspects of business activities, from leadership and decision-making


8. Data Warehouse


support for a large amount of data information storage called support data warehousing or data warehouse when you integrate several small databases into a large database and serve a broader organization, if the database stores historical data, Providing decision support, providing data aggregation, providing read-only data, well and essentially acting as a data receiver for all relevant production databases that provide data to it, then it is often called the Data Warehouse (datawarchouse) Data Warehouse architecture that can accommodate internal and external data in a variety of formats, These include various business data, historical data, current data, subscription data, and data from Internet service providers, and must include easy-to-access metadata. The result is the ability to access and synthesize data from a variety of data stores for complex data analysis. Build each wing selling pen Xin Wh.1_, 996 years in the "Building the data Wuehouse" explicitly given the definition of the warehouse is: The Data Warehouse is a theme-oriented, complete, Non-volatile, time-varying sets of data used to support decision management. The main features are as follows:

1 Theme-oriented
The data of the data warehouse is divided into the subject domain, which corresponds to the application-oriented data organization of OLTP. The subject is an abstract logical concept. Is the identity that classifies the data analysis at a higher level. Corresponds to a macro analysis area, such as policy, market analysis, price trend, etc. Subject domains should be independent and complete. Data information is organized by topic and provides information for making decisions by topic.
2. Completeness
Before entering the Data warehouse, the data is not simply extracted from the various business systems, it must be processed, summarized and collated, so that the information in the Data Warehouse is about enterprise, consistent and global data. This step is the most important and complex step in the construction of Data warehouse. It completes metadata from application-oriented to theme-oriented transformations
3. Stability
Unlike OLTP systems, data is upgraded to a data warehouse for a certain period of time, including complex extraction, generalization, aggregation, and aging processes. Once the data has entered the Data warehouse, it is generally retained for a long period. In other words, the Data warehouse is basically read-only, reflecting the content of historical data, the collection of database snapshots at different points in time, and the data derived from the statistics, synthesis, and reorganization of these snapshots, rather than the data of the OLTP system it involves operations that are primarily query operations, Users cannot delete or update them. Once the data has exceeded the data storage period, the data will be deleted from the current Data warehouse.
4 O'Clock Transsexual
The information in the Data Warehouse includes the data of each historical period of the enterprise, not just the data of the enterprise at the time or at a certain point in order to support the data analysis, it can provide the instantaneous analysis of the data and derive the data value or the development process of the enterprise and future trend analysis and other functions. The so-called change refers to a large number of historical data stored in the Data Warehouse, current data and comprehensive data, etc., they are in the eternal development and change. The factors that cause change include the introduction of new data content, the deletion of old data, and the re-synthesis of data.

(ii) Basic terminology 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.