ITPub博客

首页 > 数据库 > Oracle > oracle concept 11g--1 Introduction to Oracle Database

oracle concept 11g--1 Introduction to Oracle Database

翻译 Oracle 作者:stockDB 时间:2015-06-16 21:49:02 0 删除 编辑
The purpose of a database is to collect, store, and retrieve related information for use by database applications.
数据库的本质就是为用户收集、存储和搜索相关数据。
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 applications to access the data.
一个数据库管理系统包括,内核代码(控制内存和数据存储)、元数据(数据字典)、查询语言(SQL)
In his seminal 1970 paper "A Relational Model of Data for Large Shared Data Banks," E. F. Codd defined a relational model based on mathematical set theory.
这个是关系型数据库的重要时刻
http://dl.acm.org/citation.cfm?id=362685 for an abstract and link to Codd's paper
喜欢研究该论文的可以访问上边的网站链接
下面介绍了一些oracle的历史,暂略过,感兴趣的可以看以下链接:
http://www.oracle.com/technetwork/issue-archive/2007/07-jul/o4730-090772.html
A database schema is owned by a database user and has the same name as the user name.
一个用户拥有一个数据库的schema,并且他俩是同名的,schema并不是数据库用户,schema概念上是数据库逻辑数据结构的集合,与数据库用户概念上是不同的,虽然他们是相同的名字
A schema object is one type of database object. Some database objects, such as profiles and roles, do not reside in schemas.
schema对象就是一个数据库对象的类型,例如表或者索引。而有一些数据库对象例如profile和roles并没有在schema里
A table is a set of rows.
表就是行的集合
An index is an optional data structure that you can create on one or more columns of a table.Indexes are useful when applications often query a specific row or range of rows.
索引是一个可选的数据结构,可以创建在一个或多个列上,索引对于那种经常查询某个或者某个范围的列的应用很有用处
Indexes are logically and physically independent of the data.
索引物理和逻辑上独立于数据,创建和删除索引并不影响表或其它索引
In contrast to procedural languages such as C, which describe how things should be done, SQL is nonprocedural and describes what should be done.
C语言是过程语言,它描述了事情应该怎样做,SQL不是过程语言,描述了应该做什么

SQL statements enable you to perform the following tasks:
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

An RDBMS must be able to group SQL statements so that they are either all committed, which means they are applied to the database, or all rolled back, which means they are undone. A transaction is a logical, atomic unit of work that contains one or more SQL statements.
数据库必须是一组SQL语言要么全部提交,要么全部roll back。一个事物是逻辑性,原子性的,包含一个或者多个SQL语句
The basic principle of a transaction is "all or nothing": an atomic operation succeeds or fails as a whole.

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. For example, the database must not permit a dirty read, which occurs when one transaction sees uncommitted changes made by another concurrent transaction.

数据库只能看到自己更改未提交的数据,而不能看到别人更改未提交的数据,也就是不允许脏读。
Oracle Database always enforces statement-level read consistency, which guarantees that the data returned by a single query is committed and consistent with respect to a single point in time. Depending on the transaction isolation level, this point is the time at which the statement was opened or the time the transaction began. The Flashback Query feature enables you to specify this point in time explicitly.
oracle强制语句级别一致性,以语句的开始时间点来确定返回的数据,Flashback可以明确指定特定的时间
The database can also provide read consistency to all queries in a transaction, known as transaction-level read consistency. In this case, each statement in a transaction sees data from the same point in time, which is the time at which the transaction began.
还有一种是事物级别一致性,就是以事物开始时间为时间点,事物内所有的语句看到的数据都是一样的。
要理解各种级别的一致性的机制和实现方法

Oracle Database Architecture

An Oracle database server consists of a database and at least one database instance (commonly referred to as simply an instance).
一个oracle数据库服务器包括一个数据库和至少一个数据库实例
A database is a set of files, located on disk, that store data. These files can exist independently of a 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.
实例就是一系列管理数据文件的内存结构,实例由SGA和后台进程组成,他能够独立于数据库实例存在

For each user connection to the instance, the application is run by a client process. Each client process is associated with its own server process. The server process has its own private session memory, known as the program global area (PGA).
每个连接实例的进程都会分配一个自己的server process,这些server process都拥有一个私有的会话内存,叫做PGA




数据库中的物理结构和逻辑结构俩个是独立的,修改物理结构并不影响逻辑结构,反之亦然
数据库物理结构包括以下最基本三种文件:
1.数据文件
用于存放数据
2.控制文件
Every Oracle database has a control file. A control file contains metadata specifying the physical structure of the database, including the database name and the names and locations of the database files.
控制文件包括数据库名字以及数据文件的各自名字和位置
3.在线日志文件
Every Oracle Database has an online redo log, which is a set of two or more online redo log files. An online redo log is made up of redo entries (also called redo records), which record all changes made to data.
在线日志文件记录所有对数据的更改,以redo entries组成
Many other files are important for the functioning of an Oracle database server. These files include parameter files and diagnostic files. Backup files and archived redo log files are offline files important for backup and recovery.
还有其他比较重要的文件:参数文件、诊断日志文件、归档日志文件、备份文件等
数据库逻辑结构包括以下种类:
1.数据块
At the finest level of granularity, Oracle Database data is stored in data blocks. One data block corresponds to a specific number of bytes on disk.

数据块是数据库的最小粒度单元,oracle数据库数据存储在数据块中,一个数据块对应指定数目bytes的磁盘块
2.区
An extent is a specific number of logically contiguous data blocks, obtained in a single allocation, used to store a specific type of information.
一个区是连续的数据块,单独进行分配,存储指定类型的数据信息
3.段
A segment is a set of extents allocated for a user object (for example, a table or index), undo data, or temporary data.
一个段是分配个某个用户对象的区的集合,包括数据段、回滚段和临时段
4.表空间
A database is divided into logical storage units called tablespaces. A tablespace is the logical container for a segment. Each tablespace contains at least one data file.
数据块是被表空间进行逻辑单元分割,段逻辑上是归属于表空间,每个表空间包含至少一个数据文件

Database Instance Structures

When applications connect to an Oracle database, they are connected to a database instance. The instance services applications by allocating other memory areas in addition to the SGA, and starting other processes in addition to background processes.
当应用连接到一个数据库时,他们连接的是数据库实例。这个实例为这个应用分配一块独立于SGA的内存(PGA)进行服务,并且启动区别于其他数据库后台的进程(server process)来进行服务

Oracle Database Processes

A process is a mechanism in an operating system that can run a series of steps.
进程就是操作系统用于进行一系列动作的机制,oracle包括以下三种进程:
1.Client processes
这个进程一般由第三方软件和应用进行维护
2.Background processes
These processes consolidate functions that would otherwise be handled by multiple Oracle Database programs running for each client process. Background processes asynchronously perform I/O and monitor other Oracle Database processes to provide increased parallelism for better performance and reliability.
这些进程是用于oracle提供服务的进程,能够处理多个oracle client process,后台进程能够异步的完成I/O并且监控数据库进程以为数据库提供更好的并发性能和稳定性
3.Server processes
These processes communicate with client processes and interact with Oracle Database to fulfill requests.
Server process是oracle数据库用于与client process进行互联以满足client process的要求

Instance Memory Structures

oracle数据库实例内存结构包括以下俩种:
1.SGA
The SGA is a group of shared memory structures that contain data and control information for one database instance. Examples of SGA components include cached data blocks and shared SQL areas.
SGA是一组共享内存结构,是为整个数据库实例包含数据和数据库控制信息
2.PGA
A PGA is a memory region that contain data and control information for a server or background process. Access to the PGA is exclusive to the process. Each server process and background process has its own PGA.
PGA是用于为一个server或者background进程提供内存区域,PGA是每个进程独有的,并不共享

An important component of Net Services is the Oracle Net Listener (called the listener), which is a separate process that runs on the database server or elsewhere in the network. Client applications can send connection requests to the listener, which manages the traffic of these requests to the database server. When a connection is established, the client and database communicate directly.
listener用于把客户端的请求传输给数据库服务器,当连接建立之后,客户端和数据库直接进行沟通,而不再经过listener,停止listener对当前session无影响,但是新建的session将不能建立




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

下一篇: oracle concept
请登录后发表评论 登录
全部评论

注册时间:2015-06-15

  • 博文量
    35
  • 访问量
    24301