附件2:外文原文(复印件)
Database and Database System
What is a database?In essence a database is nothing more than a collection of information that exists over a long period of time, often many years. A database can be summarily described as a repository for data. In common parlance , the term database refers to a collection of data that is managed by a database management system, also called a DBMS, or just database system.
A DBMS is expected to:
1 Allow users to create new databases and specify their schema, using a specialized language called a datadefinition language.
2 Give users the ability to query the data, and modify the data, using an appropriate language, often called a query language or data-manipulation language.
3 Support the storage of very large amounts of data-gigabytes or more –over a long period of time , keeping it secure from accident or unauthorized use and allowing efficient access to the data for queries and database modifications.
4 Control access to data from many users at once , without allowing the actions of one user to affect other users and without allowing simultaneous accesses to corrupt the data accidentally.
The first commercial database managements systems appeared in the late 1960’s.These evolved from file systems, which provide some of item 3 above ;file systems store data over a long period of time, and they allow the storage of large amount of data. The first important applications of DBMS’ were ones where data was composed of many small items and many queries or modification were made. Such as Airline Reservation Systems and Banking Systems.
The early DBMS’s, evolving from file systems, used several different models for describing the structure of the information in a database , chief among them the “hierarchical” or tree-based model and the graph-based
— 42 —
“network” model.
Following a famous paper written by Ted Codd in 1970, database systems changed sifnificantly. Codd proposed that database systems should present the user with a view of data organized as tables called relations. Behind the scenes, there might be a complex data structure that allowed rapid response to a variety of queries. But unlike the user of earlier database ,the use of a relational system would not be concerned with the storage structure. Queries could be expressed in a very high-level language, which greatly increased the efficiency of database programmers.
Relations are tables. Databases are designed to offer an organized mechanism for storing, managing and retrieving information. They do so through the use of tables. If you’re familiar with spreadsheets like Microsoft Excel, you’re probably already accustomed to storing data in tabular form.
Just like Excel tables, database tables consist of columns and rows. Each column contains a different type of attribute and each row corresponds to a single record. For example, imagine that we were building a database table that contained names and telephone numbers. We’d probably set up columns named”FirstName”,”LastName”and”TelephoneNumber.” Then we’d simply start adding rows underneath those columns that contained the data we’re planning to store.
If we were building a table of contact information for our business that has 50 employees, we’d wind up with a table that contains 50 rows. Databases are actually much more powerful than spreadsheets in the way you’re able to manipulate data.
Originally, DBMS’s were large, expensive software systems running on large computers. The size was necessary, because to store a gigabyte of data required a large computer system. Today, a gigabyte fits on a single disk, and it is quite feasible to run a DBMS on a personal computer. Thus, database systems based on the relational model have become available for even very small machines, and they are application. Corporate databases often occupy hundreds of gigabytes. Further, as storage becomes cheaper people find new reasons to store greater amounts of data. For example, retail chains often store a terabyte or more of information recording the history of every sale made over a long period of time. Database no
— 43 —
longer focus on storing simple data items such as integers or short character strings. They can store images, audio, video, and many other kinds of data that take comparatively huge amounts of space.
In this section, we shall sketch the structure of a typical database management system. Fig.15-1 shows the essential parts of a DBMS. At the bottom, we see a representation of the place where data is stored. By convention, disk-shaped components indicate a place for storage of data. Note that we have indicated that this component contains not only data, but metadata, which is information about the structure of the data. For example, if this DBMS is relational, the metadata includes the names of the relations, the names of the attributes of those relations, and the data types for those attributes.
From the Figure above, we also see a storage manager, whose job is to obtain requested to by the levels of system above it. We also see a component that we have called the query processor, although that name is somewhat of a minomer. It handles not only queries but requests for modification of the data or the metadata. Its job is to find the best way to carry out a requested operation and to issue commands to the storage management that will carry them out.
The traction manager component is responsible for the integrity of the syste m. It must assure that several queries running simultaneously do not interfere with each other and that the system will not lose data even if there is a system failure. It interacts with the query manager, since it must know what data is being operated upon by the current queries, and it may need to delay certain queries or operations so that these conflicts do not occur. It interacts with the storage manager because schemes for protection of data usually involve storing a log of changes to the data . By properly ordering operations, the log will contain a record of changes so that after a system failure even those changes that never reached the disk can be reexecuted.
At the top of the above Figure, we see three types of inputs to the DBMS.
Queries are questions abort the data. They are generated in two different ways. One is through a generic query interface. For example, a relational DBMS allow the user to type SQL queries that are passed to the query processor and answered. Another way is through
— 44 —
application program interface. A typical DBMS allows programmers to write application programs that query the database. For example, an agent using an airline reservation system is running an application program that queries the database about flight availabilities. The queries are submitted through a specialized interface that might include boxes to be filled in with cities, times, and so on. One cannot ask arbitrary queries through this interface, but it is generally easier to ask an appropriate query through this interface than to write the query directly in SQL.
Modifications are operations to modify the data. Like queries, they can be issued either through the generic interface or though the interface of an application program.
Schema Modification is about some command which are usually issued by authorized personnel, sometimes called database administrator, who are allowed to change the schema of the database or create a new database.
In a simply database system, the storage manager might be nothing more than the file system of the underlying operating system. However, for efficiency purposes, DBMS’s normally control storage on the disk directly, at least under some circumstances. The storage manager consists of two components, the buffer manager and the file manager. The job of the query manager is to turn a query or database manipulation, which may be expressed at a very high level, into a sequence of requests for stored data.
As we discussed above, there are some special guarantees that a DBMS must make to those performing operations on a database. For example, we discussed the importance that the effect of an operation never be lost, even in the face of a severe system failure. The typical DBMS allows the user to group one or more queries and modifications into a transaction, which informally is a group of operations that must appear to have been executed together sequentially. Frequently, a database system allows many transactions to execute concurrently; e.g., something may be going on at each of a bank’s ATM machines simultaneously. The role of assuring that all these transactions are executed properly is the job of the transaction manager component of the DBMS.
— 45 —
相关推荐: