设为首页
加入收藏夹

谈谈Oracle interMedia的用法
浏览选项:

  interMedia是Oracle推出的对Oracle8i多媒体功能的扩充,包括image, audio, video三
部份。interMedia使用对象类型,类似于JAVA或C++,来描述image, audio, video类型数据
,Oracle在这三类对象中定义了许多方法来操作这些数据,如对于 image类型数据来说,你可
以很方便地进行图形格式转换,压缩,拷贝,截取图形的任何一部份等,而这些是普通LOB类
  Internet的发展更突出了interMedia在WEB应用中的价值,现有的WEB应用绝大多数将
image存在文件系统中,其优点是操作简单,速度快,缺点是管理复杂,尤其是管理大量
image时就受到目录数等的限制。如果将image保存在数据库中,由数据库来统一维护,统一
备份,这样就可以简化管理。至于存取速度则涉及到整个系统的体系结构,可以通过增加中间
  如何应用interMedia呢?
  Oracle提供两种方法,一种是用JSP和Servlet调用Oracle提供的interMedia JAVA类库来
存取image,其优点是自己可以控制程序,灵活,缺点是复杂,需要自己编写程序。Oracle提
供了例子供大家参考,大家可以到http://technet.oracle.com/sample_co...
code_index.htm, 选择Use Java Servlets & JSPs to load/retrieve rich content。这个例
子比较简单,安装、运行都有详细说明,我采用的是Tomcat 3.1 for WinNT来运行。
  第二种方法就是本文将重点介绍的利用Oracle interMedia Web Agent实现image的上传和
  什么是Oracle imterMedia Web Agent?
  它是用来解析URL来存取多媒体数据,是Oracle提供的用于在WEB上存取多媒体数据的工
具,它大大简化了对多媒体数据的操作,目前支持的WEB Server有:Apache, Oracle
Application Server, Netscape Server, 以及Microsoft IIS。
  Oracle还在NT平台上提供了一个利用Oracle interMedia Web Agent管理多媒体数据的工
具,Oracle 8i interMedia Clipboard, 利用这个工具可以自动生成操作的存储过程代码,大
  如何利用Oracle Web Agent来操作image数据呢?
  本文将以我在开发WEB项目中的部分程序为例,简要说明用法,详细的步骤还需要大家仔
细阅读例子安装说明,如在使用中遇到说明,可以去Oracle爱好者之家的新技术论坛 ,我会
  关于例子(包括以下文件):
  enter_mistore_pict.htm ? upload picture page

  disp_mistore_pict.htm ? display picture page

  mistore_upload_test.sql ? create table and stored procedure script
  upload_err.htm ? upload image error page
  系统要求:
  300MHz CPU 128MB memory (256 / 380 for performance), 500MB free disk, CD,
  Windows NT 4.0 SP3 or 5, network software installed
  Oracle8i 8.1.5 Server + client software + SQL utilities
  Apache Web Server Release 1.3.4 to 1.3.12 for NT
  Oracle interMedia Web Agent for NT
  Netscape Browser 4.5 or greater or Microsoft Internet Explorer 5.0
  安装步骤:
  下载本例
  以scott/tiger用户执行mistore_upload_test.sql, create table and stored
  下载并安装Apache Web Server Release 1.3.4 to 1.3.12 for NT
  下载并安装Oracle interMedia Web Agent for NT, 选择WEB Server为Apache.
  将所有htm考到Apache Web Server的根目录下,如C:Program FilesApache
  启动Apache Web Server
  在Web Agent中创建一个test Agent
  Open "http:/localhost/intermedia/admin" in your web browser.
  Click on Database Agents in the left pane.

  Click on Create in the right pane and then type in following values:
  agent name:
  Test
  service:
  (Use the service name defined in your tnsnames.ora file.)
  database_user:
  scott
  database_password:
  tiger
  authorized_request_class:
  clipboard
  authorized_sql_statements:
  any
  authorized_sql_procedures:
  *
  Click on Submit at the bottom of the page. Click on Apply.
  例子使用说明:
  在IE或Netscape中打开http://localhost/enter_mistore_pict.htm.
  选择商店的颜色,输入你的招呼语,然后点击Browse…选择一幅图代表你的LOGO,注意对
  点击upload Logo保存所有信息到stores表中,如果你的图不合规格则会出错提示。若一
  若想了解更多,请参考以下资料
  Coloring the Information Superhighway By Douglas Scherer (Oracle Magzine)
  Oracle8i interMedia -- Using Oracle8i interMedia with the Web



Copyright © 2004 wanxu.com All Rights Reserved