oracle series - first database fundamentals
Chapter I. Database fundamentals
1.1 Overview of data management 1.1.1 What is data management The greatest advantage of computers over us humans is their ability to run at high speed and with precision, and the process of their operation is the execution of program code and manipulation instructions and the processing of data. Arguably, data processing is the most basic function of a computer, and data
Management, on the other hand, is an important part of data processing. Before we go any further, we need to clarify a few basic concepts that are relevant.
Information It is a signal and message that reflects the state of objective things in the real world, changes in development and their laws. here The so-called "objective things" can be concrete (such as people, animals, birds) or abstract (events, phenomena or actions, such as (The tide rises and falls, the clouds roll in and out). Or, information is the ability to be represented through a medium such as numbers, symbols, words, sounds or images and knowledge that is accessible to human beings. As the basis for analysis, decision making and behavior in people's working life, information has the characteristics of objectivity, suitability Features such as usability, transferability and shareability. Of course, information is not unique to us humans, and bird language (the chirping of birds) conveys It's the information about the birds.
Data It is a specific representation of information, such as the aforementioned numbers, symbols, words, sounds or images. in computing In computer technology, data refers to that which is processed when a program or instruction is executed, while program code and instructions are not "data" The scope of the Of course, in a broader sense, program code and instructions also belong to the category of "data". Data usually consists of elements such as data name (data meaning), data type, and data value, where the data value is also subject to the number Constraints on the type of data and the range of values taken. The data represent information qualitatively (e.g., a person's weight status as "undernourished", "undernourished", "undernourished"). "normal weight", "obese") and quantitative expressions (e.g., a person's weight value of 18.5 kg) are distinguished.
Data Processing It refers to the collection, organization, collation, processing, storage and dissemination of data. In a broad sense, everything that involves data can be considered to be working with data. Data processing consists of three types that can be subdivided into data management, data processing and data dissemination.
Collecting information, representing it as data, classifying, organizing and storing it to be able to provide it when it is needed According to.
Transformation, extraction and arithmetic operations on data. Processing the existing data (raw data) will yield more useful data (i.e. processing results, such as the total price of items in a shopping trip, the total amount spent by the member in a specified time period), to guide human behavior or The operational development of things.
That is, the dissemination of information - the transmission of data in various forms in space or time, including the display operation of data, the process of dissemination Does not change the structure, nature, or content of the data, but can be expressed in different forms or effects (e.g., tables, graphs, physical models) type, audio/video, etc.) to reach more people with information.
As mentioned above, Data Management (DM) refers to the classification, organization, coding, preservation, maintenance, and Search and statistics. Specifically, the data collected is reasonably sorted and organized, coded, and saved to a physical storage in devices (e.g., disks) so that data can be stored over time; data maintenance refers to inserting new data, modifying existing data as needed and operations such as deleting invalid data; data retrieval (i.e. data query) and data statistics functions are used to quickly get the required data for various usage requirements.
1.1.2 History of Computer Data Management Technology Development As mankind enters the information society, there is an increasing demand for data management in the field of computer application technology, and computing Machine data management technology has evolved rapidly and its development can be broadly divided into three phases. 1. Manual management phase In the early days of computer technology, computers were mainly used for scientific computing, and their hardware storage devices were mainly external tape drives, card machines, paper tape machines, etc., when direct access storage devices such as disks had not yet been invented; software was also in its infancy - still There is no operating system and no software dedicated to managing the data. which was a period in which the organization, storage and management of data was done entirely by hand by programmers. Hence the term "manual management phase". The manual approach to data management is characterized by. – The data is not stored separately, but is mixed with the program code and is therefore not independent; to modify the data, you must fix the Change of procedure. - The programmer must define the storage structure of the data, implement its access operations in the program itself, forcing the programmer to work directly with the object dealing with management equipment, which makes programming more difficult and programming inefficient. - The data is program-dependent, which means that even if multiple different programs use the same data, it cannot be shared, only have to define, store and manage data separately, which can easily result in a high level of data redundancy and cannot guarantee data The consistency of the It can be seen that data management at this stage stage is very inefficient.
2. Document management phase Organization and permanent storage of data in the form of files in computer storage devices and implemented by the file system in the operating system Unified management - The file system has dedicated data management software to provide data access, query and maintenance functions, providing for a unified One file structure and common access methods. The management of data files is not application-specific, but still lacks the independence of data from programs and prevents true Positive data sharing. Another problem is that when the logical structure of the data changes, the structure definition of the data file must be modified at the same time as the corresponding program code, which can make it more difficult to maintain and upgrade the program.
3. Database management phase Database management evolved from the previous file management and is an advanced stage of computer data management technology. To meet the large number of Centralized storage of data, sharing of data by different types of programs, concurrent access by multiple users, maintenance of data integrity, distributed processing, and The need for security has led to attempts to make the storage and management of data completely independent of the application and to minimise Data redundancy, and so emerged the database management system. The characteristics of the database management approach are described in detail in the next section.
1.2 Overview of the database
1.2.1 Main features of the database As the name implies, a database is a place to store data. To be precise, a database (Data Base, DB) is a database that is created in accordance with some data The model organizes a collection of data and also provides data management capabilities. The database has the following main features.
Data sharing has two implications: different users can access data in the database at the same time, and its specific usage can; use Users can access the database in different ways, such as directly using administrative management tools, or in web client applications. The program accesses the database through a programming interface.
Compared to file systems, database systems enable data sharing, thus avoiding the need for users to create dedicated The data file of the。 Reduced potential duplicate data（ Data redundancy）， Easy to maintain data The consistency of the ' High level of independence between data and procedures Data independence includes the logical structure of the data in the database and the application independent of each other, as well as the physical storage structure of the data The changes do not affect the logical structure of the data. Knowledge of the database storage structure is described in detail in a later section
The database management system provides unified data storage, maintenance (adding, deleting, and modifying data) to external parties. data), retrieval and simple statistical functions, the applications using the data need only follow a uniform interface to deal with the database management system. Call on their data management administration functions without having to work in silos. The prerequisite for centralized data management is a unified data model that organizes the data and reflects the relationship between the data. The document management approach has difficulty doing this, as the data is in a fragmented state. The file types and storage structures are not uniform enough and the performance in ensuring data consistency and concurrent access is very limited. ' Ensure data consistency, security and reliability The reliability of shared data can only be guaranteed if centralized data management is achieved, otherwise it can easily lead to multi-application concurrency Inconsistency issues when accessing data. The database management system supports concurrent access to data (allowing simultaneous multiple path access), enabling good control of interactions between users and ensuring data consistency. Security and reliability are constant themes in database technology, and database management systems provide the relevant technology, including Mechanisms or methods to prevent illegal operations, incorrect updates and unauthorized use of data, and to provide work on fault detection, diagnosis and recovery Tool or function.
1.2.2 Database related terms Database (DB) A database is a collection of data organized according to some data model, where the data in the collection are as non-duplicative as possible and in an optimal way style for multiple applications in a particular organization, the data structure in the collection is independent of the application using it, and the incremental, Deletions, changes and retrievals are managed and controlled by a unified software (database management system).
Database Management System (DBMS) A database management system is a large piece of software that manipulates and manages databases and is used to create, use and maintain them. DBMS Unified management and control of the database, including data addition, deletion, modification and retrieval operations, to ensure the security of the database and
Integrity. The DBMS is used by users to access data in the database and by database administrators to maintain the database. Work. The DBMS provides a variety of features to support concurrent access to the database by multiple applications and multiple users in different ways.
Database Administrator (DBA) The database administrator is the person responsible for creating, monitoring and maintaining the entire database, whose responsibilities include: database installation, data library configuration and management, privilege settings and security management, monitoring and performance tuning, backup and recovery, and resolving other general issues to Enables data to be used effectively by anyone authorized to do so. A database administrator is a highly specialized position with relatively more stable and higher paying jobs, generally held by a technically Highly qualified and senior personnel to serve. Currently, the division of labor in this area is not very well defined in the country, and most small and medium-sized enterprises do not have a dedicated DBA, but rather a network administrator, etc., who also serves as a
Database Application System (DBAS) Within the database field, the various types of applications that use databases are often referred to collectively as database applications. To be precise. A database application system is a software system that can actually run to store, maintain and process data, usually consisting of a database, data The library management system, the database administrator, the application and the end user have five components. where the database holds the data centrally and the data (a) The database management system provides unified management and maintenance of the database, which together is what we commonly refer to as database software. Applications interact with database management systems, indirectly access and manipulate data in databases; database administrators operate database administration system for database management and maintenance; and the end user interacts only with the application.
databases Database management system Application End User Database Administrator Data Warehousing (DW) The Data Warehouse is a Subject Oriented, Integrate, and A collection of relatively stable (Non-Volatile) data that reflects historical change (Time Variant) and is used to support management decisions. A data warehouse is an environment, not a product, that provides users with current and historical data for decision support that Data is difficult or impossible to obtain in traditional operational databases. Data warehousing technology is designed to effectively integrate operational data into a unified An umbrella term for the various technologies and modules that provide access to decision-oriented data in a one-of-a-kind environment. Everything is done to make the user faster and Easy access to the information needed to provide decision support.
Simply put, a data warehouse is a collection of data from different databases, organized and used primarily to make long-term trends Analysis. Data warehouse applications are generally characterized by more complex operations, involving a larger volume of data, but less concurrent work much and the speed requirements are less intense, such applications require strong data management tools in addition to the database system, such as: complete In addition to the control of the security and reliability, the database system is required to support large data volume and effective statement optimization, powerful statistical features and strong batch processing capabilities, etc.
1.2.3 Database classification and development history As mentioned earlier, the advent of databases (database management systems) has overcome the limitations of document management systems. The later expansion was driven by the need to provide greater independence between applications and data, thereby reducing Development and maintenance costs of applications; management of increasingly complex data types and structures; reduction of technical requirements for database users - -Users do not need to have programming skills or detailed knowledge of how data is stored and managed in the database; it provides a simpler and more efficient way to manage data. Convenient and fast data access services; support stronger data sharing, consistency, security and reliability; provide more powerful data Statistical, decision support functions. The core and foundation of a database system is the data model Various database systems work on the basis of some data model, and thus are usually characterized according to the data model by combining traditional Database systems are divided into three types of databases: mesh databases, hierarchical databases and relational databases.
Web-based database As the name suggests, a mesh database uses a mesh data model with record types as nodes, a navigational (Navigation) of the database - the user not only specifies the object (data) to be accessed when manipulating the database, but also its Access path.
The world's first mesh database management system (and the first database management system) was developed by General Electric Developed by Charles Bachman and others in the early 1960s, the IDS (Integrated DataStore) was a new product called the IDS. into data storage) of the database management system laid the foundation for the mesh database, which was widely promoted and used at the time, doing For the primary stage database product, IDS can only run on General Motors mainframes. In 1971, the Committee on Data Systems Languages (CODASYL) in the United States The Data Base Task Group (DBTG) has produced a well-known DBTG report on the mesh data model and The language was defined, and revised and supplemented twice, in 1978 and 1981. Thus the mesh data model is also known as CODASYL model or DBTG model. In 1984, the American National Standards Institute (ANSI) proposed a mesh definition language (Network
Definition Language (NDL) recommended standard. In the 1970s, there were a large number of DBMS products with mesh databases. Some of the more famous ones are Cullinet Software Inc. IDMS, Honeywell's IDSII, Univac's DMS1100, and HP's IMAGE, among others. The mesh database model is a relatively natural simulation for both hierarchical and non-hierarchical information, and before the advent of relational databases A mesh DBMS is more commonly used than a hierarchical DBMS. Mesh databases hold an important place in the history of database development.
Hierarchical database Hierarchical databases follow on the heels of web-based databases, which use a hierarchical data model (similar to a "tree" in data structures) to simulate things organized hierarchically in the real world. Hierarchical database management systems also access data by record, and hierarchical The most basic data relationship in the data model is the basic hierarchical relationship, which represents a one-to-many relationship between two record types, also called a double Parent-Child Relationship (PCR ). The database has and only one record type without biparent, called the root node Point. Other record types have and have only one biparent.
The advantages of a hierarchical data model are its simple structure, clear hierarchy, ease of understanding, and ability to provide good integrity support. such Disadvantages include: cumbersome when handling data with non-hierarchical links such as many-to-many links, and can only be achieved by introducing redundant nodes or virtual nodes point to achieve this; querying a child node must be accessed through the parent node, i.e., from the root, which reduces the efficiency of data access; hierarchical The type of database has more restrictions on data insertion and deletion. The most famous hierarchical database product is IBM's IMS (Information Management System), an IBM The earliest large-scale database system developed by the company.
Relational databases Relational databases（Relationship Database, RDB） Using a two-dimensional table structure to store and manage data， and provides for the table and inter-table data dependencies. It can be simply understood that the table structure in a relational database is the same as the one we often use in our daily lives The data sheet of the（ for example Office office softwareWord/Excel Table in） corresponds， definitely Relational databases After abstraction in the The data table structure can support more data types with the required constraints attached, which is in line with the fact that technology is derived from real-world, and serve the essential laws of real-world productive activity.
Relational databases Use of structured query language（Structured Query Language，SQL ） As a client program with the number of The bridge between the database servers - the client sends SQL commands to the server, the server executes the relevant commands and returns The resultant outcome of their query. The relational model is simple in structure, single concept, and easy to learn and use. Relational models are often less efficient at querying than non- relational model, optimization is needed to improve performance, which is somewhat going to increase the burden on the user and on the user's overall database There is a high level of knowledge required. In June 1970, Edgar Codd, a researcher at IBM, published his famous paper "Large Shared Database Data (A Relational Model of Data for Large Shared Data Banks), which is the history of database development A milestone， And so it begins. Relational databases software revolution。 go through 30 More than a year of continuous development progress， Relational databases then is the mainstream of today's applications， The current popular large Relational databases include Oracle、IBM DB2、Microsoft SQL Server 、 SyBase, Informix, etc.
Copyright statement. This book is the original textbook of Beijing Xinkehai School-v512 Studio, all rights reserved, the circulator may not be used for profit purposes, please indicate the source of reproduction. Contact the author at. Zhang Liguo firstname.lastname@example.org Related Resources. New Cohoi School http://www.jobedu.com.cn/ Studio v512 http://www.v512.com HD video download http://www.verycd.com/topics/215898/
E | email@example.com B |http://www.cnblogs.com/hongten