[译]ORACLE数据弹药桶(Data Cartridge)简介
In addition to the efficient and secure management of data ordered under the relational model, Oracle now also provides support for data organized under the object model. Object types and other features such as large objects (LOBs
), external procedures, extensible indexing and query optimization can be used to build powerful, reusable server-based components called data cartridges.
除了在关系模型下的有效、安全的数据顺序(或请求)管理,ORACLE也提供了在对象模型下的数据组织的支持。对象类型和其它像大对象(LOBs)、外部过程、可扩展索引和查询优化等特性能够用来创建强大、可重用的基于服务器的组件,叫做数据弹药桶(data cartridge)。
What Are Data Cartridges?
Within the framework of the Oracle Extensibility Architecture, data cartridges are the mechanism for extending the capabilities of the Oracle server. What does this mean?
在ORACLE的可扩展架构的框架下,数据弹药桶是一种扩展ORACLE服务器能力的机制。什么意思呢?
First, Oracle lets you capture the business logic and processes associated with domain-specific data in user-defined datatypes. In some cases, where the data cartridge provides new behavior without needing new attributes, the vehicle of implementation may be packages rather than formal types. Once you have defined these types using either of these approaches, Oracle enables you to determine the manner in which the server interprets, stores, retrieves, and indexes the data. Ultimately, data cartridges are the means to package this functionality as software components that can then be plugged into a server to extend its capabilities into a new domain.
首先,ORACLE可以让你捕获业务逻辑和流程,与用户定义数据类型的、特定于域的数据相关联。出于某种原因,数据弹药桶的这些功能可以通过包(package)来实现,而不需要额外的机制。确定了这种方式后,Oracle就会使你具有决定以何种方式解释、存储、抽取和索引数据的能力。那么,数据弹药桶的意思就是把这些功能,以软件组件的形式打包到一个新的域中。这些组件可以加入到一个服务器中扩展它能力。
This is all possible because the database has itself been made extensible. That is, you can now customize the indexing and query optimization mechanisms of the database management system for user-defined business objects and rich types. Where the native implementation of indexing and query optimization service could be improved for some specialized processing you require, you can provide your own implementations of these services. You use the extensibility interfaces to register your implementations with the server. Registering them causes the server to use your implementations instead its own when doing your specialized processing.
由于数据库本身已经是可扩展的,所以一切成为了可能。就是说,你现在可以为自已的业务对象和富对象定义数据库管理系统的索引和查询优化机制。可以提供自己的索引和查询优化实现方法,来改进原有的服务实现。你要用扩展接口在服务器注册这些实现。注册它会,会让服务器在处理特定流程时,使用你的实现来代替原有本身的实现。
扩展接口包括了一些功能,当服务器根据需要调用执行
ORACLE定义了这些接口。而你,弹药桶的开发者,要自己实现这个方法(也叫“接口”)来实现特殊的行为。一般情况下,你通过对象的静态方法来实现这个功能。实现了扩展索引接口的对象,叫作索引类型(indextype);实现了可扩展的优化接口,叫作统计类型(statistics type)。
The key characteristics of data cartridges are as follows:数据磁带的主要特点如下:
- Data cartridges are server-based . 墨盒是服务器的数据为基础 。 Their constituents reside on the server or are accessed from the server.他们的成分驻留在服务器或从服务器进行访问。 The bulk of processing for data cartridges occurs at the server, or is dispatched from the server in the form of an external procedure.在处理大容量数据磁带发生在服务器上,或者是从一个外部程序窗体服务器发出。
- Data cartridges extend the server . 数据磁带扩展服务器 。 They define new types and behavior to provide componentized, solution-oriented capabilities previously unavailable in the server.他们定义新的类型和行为,提供组件化,面向解决方案的能力,以前在服务器不可用。 Users of data cartridges can freely use the new types in their application to get the new behavior.数据墨盒,用户可以自由地使用他们的新类型的应用得到新的行为。 Having loaded an Image data cartridge, the user can define a table
Person
with a columnPhoto
of typeImage
.有一个图像加载数据磁带,用户可以定义一个表Person
与一列Photo
类型的Image
。 - Data cartridges are integrated with the server . 数据墨盒集成了服务器 。 The extensions made to the server by defining new types are integrated with the server engine so that the optimizer, query parser, indexer and other server mechanisms recognize and respond to the extensions.由定义新的类型的服务器的扩展集成与服务器引擎,使优化器,查询分析器,索引器和其他服务器识别和应对机制的扩展。 The Oracle Extensibility Framework defines a set of interfaces that enable data cartridges to integrate with the components of the server engine. Oracle的扩展框架定义了一个接口,使数据集成与墨盒的服务器引擎的组件。 For example, the interface to the indexing engine allows for domain-specific indexing.例如,对索引引擎的界面允许特定于域的索引。 Optimizer interfaces similarly allow data cartridges to define domain-specific ways of assessing the CPU and I/O cost of accessing cartridge data.优化界面同样允许数据磁带,以界定评估的CPU和I / O代价获取墨盒数据域的具体方式。
- Data cartridges are packaged. A data cartridge is installed as a unit. 数据墨盒包装。一个数据磁带是作为一个单位安装。 Once installed, the data cartridge handles all access issues arising out of the possibility that its target users might be in different schemas, have different privileges and so on.一旦安装完毕,所有访问数据磁带处理所引起的问题的可能性,其目标用户可能在不同的模式,有不同的权限等。