资源预览内容
第1页 / 共11页
第2页 / 共11页
第3页 / 共11页
第4页 / 共11页
第5页 / 共11页
第6页 / 共11页
第7页 / 共11页
第8页 / 共11页
第9页 / 共11页
第10页 / 共11页
亲,该文档总共11页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
Database and Data WarehousesWhat is a Database?What is a database? A database is a collection of related data items. It is generally stored on secondary storage devices that allow rapid direct access to individual data items. Redundancy is minimized; where possible, only a single copy if a data item exists. The database may be used by many different application systems at once, eliminating the need for separate systems to maintain the data for each application .When a user program inquires if a particular item is in the database, a database management system (DBMS) does the actual searching. The user does not need to be familiar with the format in which the data is stored or the actual physical location of the data.The DBMS cerates the database, keeps it up-to-date, and provides reday access to authorized user. Database management systems also provide extensive security measures to prevent unauthorized access. They make it convenient for expressing relationship between related data items and facilitate the design of user application systems. They provide backup and recovery capabilities to prevent against loss or destruction of vital information. They ensure database integrity, that is, what is supposed to be in the database is there and what is not supposed to be .isnt. a person called the database administrator determines who may access the database, modify it, add new relationships ,and the like. This is a very important lifeline. The real question in database management systems is how to organize information to provide rapid answers to the kinds of questions users are likely to ask. The same data organized differently can yield drama-tidally different access speeds. There common ways are used to structure a database to indicate the relationships among the data items; these are the relational database, the hierarchical data-base, and the network database.Hierarchical, Network, and Relational Databases (three principal logical database models)The Hierarchical Model In a hierarchical database, data records are arranged in a strict parent child relationship. Each parent record may have many children, but each child record has exactly one parent. Figure 3-1 shows a simple hierarchical database, indicating the relationship between a customer and the orders it has placed with a company. Searching a hierarchical database is rapid and convenient as long as it is searched from the top down. IBMs IMS (Information Management System) is the most widely used hierarchical DBMS. Hierarchical DBMS are best suited for problems that require a limited number of structure answers that can be specified in advance. Once data relationships have been specified, they cannot easily be changed without a major programming effort. Thus, the hierarchical model cannot respond flexibly to changing requests for information.The Network Model The network database model is best at representing many-to-many relationship among data. In other words, a ”child” can have more than one “parent”, as Figure3-2 illustrates. Computer Associates IDMS is a network DBMS for computer mainframes.Network DBMS are more flexible than hierarchical DBMS, but access paths must still be specified in advance. There are practical limitations to the number of links, or relationships ,that can be established among records. If they are too numerous, the software will not work efficiently. Neither network no hierarchical database management models can easily create new relationships among data elements or new patterns of access without major programming efforts.The Relational Model In the early 1970s the relational database approach was developed to provide a much more user-friendly organization. Instead of using complex structures of pointers the relational database stores information simply as tables called relations. These tables are sometimes called flat because the rows of the table really are very much the same as the records of a file.Each row in a relation is called a record. Each column corresponds to a particular field within the record (fields are also called domains).The fields are headed by attributes, which describe the entries in the column. A relational database consists of one or more relations. A relational DBMS performs three primary operations on relations to form new relations:(1) Two relations may be joined (combined).(2) A relational may be projected (some of the columns are extracted form the relations and used to form the columns of the new relation).(3) Records may be selected according to various user specified criterias(Structured Query Language) is the most important query language based on the relational model. For instance, a relation named Accounts, record bank accounts, their balance, and type might look like: AccountsAccountBalanceType1739211700.00Checking251101888.00Savings Heading the columns are the three attributes: Account No
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号