ITPub博客

首页 > Linux操作系统 > Linux操作系统 > chapter 1 introduction to oracle database

chapter 1 introduction to oracle database

原创 Linux操作系统 作者:Tonlay 时间:2011-08-31 13:16:47 0 删除 编辑

       第一章是整本书的绪论,简略讲了几个方面,这几个方面涵盖了这本书的大部分内容,这本书就由这几个方面展开。

       首先由信息系统引入了数据库和数据库管理系统。大概讲了数据库管理系统的几个部分。接下来又引入了关系型数据库及其管理系统,介绍了关系型数据库的几个特点。还有几个概念,元组(关系)列(属性)。一个RDBMS划分了两种操作(what and how),并将后者对应用程序透明化。

     接着介绍方案对象,主要介绍了表和索引。

     然后是数据访问,sql语言及其能够完成的几种操作,进而介绍了两种对sql的扩展,PL/SQLJAVA,它们都作为对象被存储在数据库中。

     事务管理,必要性,事务管理能够控制对数据的并行性访问(锁机制),还能够保持数据一致性。

      数据库的结构,通常oracle database server包括database database instance两部分。而打他database又包括物理和逻辑结构,instance也分为好几部分(如processmemory sructures).

一、数据库基本概念

       人们需要存储和处理数据,就有了信息系统的诞生。An information system is a formal system for storing and processing information.数据库是一种先进的information system.A database is an organized collection of information treated as a unit. The purpose of a database is to collect, store, and retrieve related information for use by database applications. (存储信息,为专门的应用程序处理信息提供了方式方法)。

 

      A database management system (DBMS) is software that controls the storage,

organization, and retrieval of data(实现数据库功能的软件). Typically, a DBMS has the following elements:

Kernel code

This code manages memory and storage for the DBMS.

Repository of metadata

This repository is usually called a data dictionary.

Query language

This language enables users to access the data.

 

A database application(数据库应用程序) is a software program that interacts with a database to access and manipulate data.

 

下面又谈到了关系型数据库:

A relational database is a database that conforms to the relational model. The

relational model has the following major aspects:

Structures

Well-defined objects store or access the data of a database.

Operations

Clearly defined actions enable users to manipulate the data and structures of a

database.

Integrity (完整性)rules

Integrity rules govern operations on the data and structures of a database.(完整性用来保证对数据库中数据的存储是合乎必要的规则的)。

 

A relational database stores data in a set of simple relations. A relation is a set of

tuples. A tuple is an unordered set of attribute values.

(关系是元组,一个元组是一些属性的无顺序的集合)

 

An RDBMS distinguishes between the following types of operations:

(一个RDBMS区分了下面两种操作)

Logical operations(tell the database what to do)

Physical operations(the database itself how to do)

(人们告诉数据库做什么,数据库决定怎么做)

 

二 、方案对象(Schema Objects

One characteristic of an RDBMS is the independence of physical data storage from

logical data structures.

 

a database schema is a collection of logical data structures(schema objects).a database schema is owned by a database user and has the same name as the user name.

 

(1)table,describes an entity,including a set of rows(a row identifies an instance of the entity).

integrity constraints(rules)

(2)Index,increase the performance of data retrieval. Indexes are logically and physically independent of the data.

 

三、数据访问(data access)

采用sql这种标准化的语言 ———Structured Query LanguageSQL

In contrast to procedural languages such as C, which describe how things should be done, SQL is nonprocedural and describes what should be done. Users specify the result that they want (for example, the names of current employees),not how to derive it.

 

SQL 可以完成以下任务(SQL分类)

  Query data

  Insert, update, and delete rows in a table

  Create, replace, alter, and drop objects

  Control access to the database and its objects

  Guarantee database consistency and integrity

 

PSL/SQL and Java(the extension of sql)

A primary benefit of PL/SQL is the ability to store application logic in the database

itself. A procedure or function is a schema object that consists of a set of SQL

statements and other PL/SQL constructs, grouped together, stored in the database,and run as a unit to solve a specific problem or to perform. a set of related tasks.procedure/function 也是 方案对象,被存储在数据库中)

四、Transaction Management(事务管理)

事务管理的必要:oracle database is designed as a multiuser database.

 

Transactionan atomic operation succeeds or fails as a whole.

事务是数据库比一般的文件系统(file system)高明之处.

事务管理能够实现:

1Data Concurrency (控制程序对数据的并行访问)

A lock is a mechanism that prevents destructive interaction between transactions accessing a shared resource. Locks help ensure data integrity while allowing maximum concurrent access to data.(在保证数据完整性的同时减少对并发访问的影响)

2Data Consistency

In Oracle Database, each user must see a consistent view of the data, including visible changes made by a user's own transactions and committed transactions of other users.

statement-level read consistency?)

五、Database Architecture

      An Oracle database server consists of a database and at least one database instance. The term Oracle database is sometimes used to refer to both instance and database.

Database

A database is a set of files, located on disk, that store data. These files can exist

independently of a database instance.

Database instance

An instance is a set of memory structures that manage database files. The instance

consists of a shared memory area, called the system global area (SGA), and a set

of background processes. An instance can exist independently of database files.

 

The database has physical structures and logical structures. Because the physical and logical structures are separate, the physical storage of data can be managed without affecting access to logical storage structures. For example, renaming a physical database file does not rename the tables whose data is stored in this file.

 

Database storage structure

PhysicalData files (data)  controlfiles online redo log files(record changes)

LogicalData Blocks Extents  Segment(for a user object)   Tablespace

 

Data instance structure(配图)

oracle database process

consists of client process,background process and server process(oracle process)

 

Instance Memory Structures

(1)SGA(System Global Area),shared memory

(2)PGA(Program Global Areas),exclusive to the processes. Background process

and server process has its own PGA.

 

 

APPLICATION AND NETWORKING ARCHITECTURE

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26171981/viewspace-706330/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2011-08-23

  • 博文量
    3
  • 访问量
    3366