Oracle Database 基本概念

1、Oracle 服务器是一个数据管理系统(RDBMS),它提供开放的、全面的近乎完美的信息管理。Oracle 是由一个 Oracle 实例和一个 Oracle 数据库组成。

Oracle 服务器由两大部分组成,Oracle 数据库和 Oracle 实例。

(1)Oracle 数据库是位于硬盘上实际存放数据的文件,这些文件组织在一起成为一个逻辑整体,即为 Oracle 数据库。因此在 Oracle 看来,数据库是指硬盘上文件的逻辑集合,必须要在内存里的实例合作才能对外提供数据管理服务。



 

(2)Oracle 实例是位于物理内存类的数据结构,它有一个共享的内存池和多个后台进程所组成,共享的内存池可以被所有进程访问,用户如果要存取数据库里的数据(也就是硬盘上的文件)就必须通过实例才能实现,不能直接读取硬盘上的文件文件。实例可以操作数据库,在任何时刻一个实例只能与一个数据库关联,但是一个数据库有可能被多个实例访问。

一个数据库文件读到内存中,就是一个实例 Instance,一个 Instance 会把所占用的内存分为多个块,我们所操作的数据库就是操作内存中的 Instance ,不能直接操作数据库。当我们通过 JDBC 获得 Connection 连接到这个 Instance 时,Instance 会为这个 Connection 开辟一个内存(PGA),有一个连接进来就会有一个 PGA。一个Instance 中可以有多个 PGA,但是只有一个全局 SGA 区段。Instance 和数据库可以是多对一的关系。也就是一个数据库可以对应多个 Instance ,这就是集群(RAC),如果一台机器崩溃,也就是一个 Instance 瘫痪,我们可以用另外一个主机中的 Instance 继续提供数据库连接。

我们操作数据库只是在 PGA 中进行增删改查,当我们将操作 commit 时,是将操作提交给了 SGA 中,SGA 还是在内存中,至于 SGA 中的数据什么时候提交到数据库是由服务器决定。这种方式叫两阶段提交。只要数据还在 SGA 中,我们就还有机会修改数据,这就是闪回的原理。

2、表空间,表空间为逻辑概念,数据文件为物理概念。表空间由多个数据文件组成,数据文件只能属于一个表空间。表空间对应着实例中的 PGA。我们常用的表空间为 users 表空间。

3、Oracle 相关服务:OracleDBConsoleorcl: 管理 Oracle 的 Web 界面服务器。OracleJobSchedulerORCL:Oracle 的定时服务。OracleOraDb10g_home1liSQL*Plus:是一个界面画操作的 Web 服务器。OracleOraDb10g_home1TNSListener:Oracle 客户机监听服务。客户机要是连接 Oracle 就必须启动该服务。比如通过 JDBC 连接 Oracle(jdbc:oralce:this:@localhost:1521:orcl)性能比较低,通过 Oracle 客户机连接 Oracle(jdbc:oracle:oci:@loaclhost:1521:orcl)性能要高很多。

转载于:https://www.cnblogs.com/Joseph/archive/2011/09/21/2184212.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The inspiration for the material contained in this book comes from my experiences developing Oracle software, and from working with fellow Oracle developers to help them build reliable and robust applications based on the Oracle database. The book is basically a reflection of what I do every day and of the issues I see people encountering each and every day. I covered what I felt was most relevant, namely the Oracle database and its architecture. I could have written a similarly titled book explaining how to develop an application using a specific language and architecture—for example, one using JavaServer Pages that speaks to Enterprise JavaBeans, which in turn uses JDBC to communicate with Oracle. However, at the end of the day, you really do need to understand the topics covered in this book in order to build such an application successfully. This book deals with what I believe needs to be universally known to develop successfully with Oracle, whether you are a Visual Basic programmer using ODBC, a Java programmer using EJBs and JDBC, or a Perl programmer using DBI Perl. This book does not promote any specific application architecture; it does not compare three tier to client/server. Rather, it covers what the database can do and what you must understand about the way it works. Since the database is at the heart of any application architecture, the book should have a broad audience. As the title suggests, Expert Oracle Database Architecture concentrates on the database architecture and how the database itself works. I cover the Oracle database architecture in depth: the files, memory structures, and processes that comprise an Oracle database and instance. I then move on to discuss important database topics such as locking, concurrency controls, how transactions work, and redo and undo, and why it is important for you to know about these things. Lastly, I examine the physical structures in the database such as tables, indexes, and datatypes, covering techniques for making optimal use of them.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值