search
HomeDatabaseMysql TutorialOracle建立二进制文件索引的方法

Oracle建立二进制文件索引的方法

正在看的ORACLE教程是:Oracle建立二进制文件索引的方法。Oracle text是Oracle的全文检索技术,是9i版本标准版和企业版的一部分。Oracle text使用标准的sql语言索引、查找、分析存储在oracle数据库、文件或者网络里的文本及文档。 Oracle text能进行关于文档的语言分析,使用多种方法查找文档,包括关键字、上下文查询、逻辑操作、模式匹配、混合主题查询、HTML/XML段落查找等方法。Oracle text在包含文本和结构化的关系属性的混合查询方面具有优越性。下面举例说明。

  现有文档表ZYCONTENT_TABLE为上载文件的存储表,二进制文件以BLOB类型存储在BLOB_CONTENT列中,oracle text技术提供为BLOB列中的二进制文本文件建立索引的方法,细节如下:

  一、准备工作

  文档表的模式为ZYFILEUP,文档表为ZYCONTENT_TABLE。文档表定义为:


  二、为拥有文档表的模式建立文本索引授权

  以system用户连接数据库,为ZYFILEUP授权。


  三、建立文档表在BLOB_CONTENT列上的索引

  以ZYFILEUP用户连接数据库,建立文本索引参考项


  建立索引


  四、索引同步和删除

  同步索引的两种方法:


  和


  删除索引的方法:


  五、索引功能介绍

  1.索引的文件类型

  Oracle text可以过滤以及从不同格式的文档里提取内容,它支持150多种文档格式,最常见的MS OFFICE文档、PDF文档等都可由Oracle text来检索。

  2.过滤器介绍

  对于纯文本文件格式,如TXT、HTML、XML等文件,使用空过滤器,即NULL_FILTER,对于二进制文件,使用INSO_FILTER过滤器,如果文档表的BLOB列中含有二进制文件和纯文本文件,也要用INSO_FILTER过滤器,但最好是把纯文本和二进制文件分开存储和索引。Oracle text还提供包来从二进制文件中提取文本到纯文本文件中。

  3.词典

  可以定制不同语言的词典,该词典含有同意词和词的级别关系。Oracle text可以提供多语言的最优特性以支持跨越西方语言、日语、朝鲜语、传统和简体中文所写的文档查找。

  六、文本查询语句格式


  contains函数提供强大的查询功能,"与"、"或"关系,相近(near ;)和排除(not ~)等功能,更方便的是它还可以根据某一关键词查询不同语种的文本,当然,这要事先设定词典。

  七、实际应用中的问题

  在我的实际应用中,最常用的是使用Oracle text对Word、Excel、PowerPoint、HTML、PDF等格式的中文文档进行索引,但我发现,无论使用INSO_FILTER还是NULL_FILTER,无论使用BASIC_LEXER还是CHINESE_LEXER,都不能检索RTF格式的文本文档,我在win2000,XP下试验,都没成功,不知什么原因。总体来说,Oracle text的文本检索功能还是相当出色的,它甚至不需要文本文件存储在数据库里,即使存储在操作系统的文件目录里,Oracle text也能在数据库里为文件建立索引。
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MySQL String Types: Storage, Performance, and Best PracticesMySQL String Types: Storage, Performance, and Best PracticesMay 10, 2025 am 12:02 AM

MySQLstringtypesimpactstorageandperformanceasfollows:1)CHARisfixed-length,alwaysusingthesamestoragespace,whichcanbefasterbutlessspace-efficient.2)VARCHARisvariable-length,morespace-efficientbutpotentiallyslower.3)TEXTisforlargetext,storedoutsiderows,

Understanding MySQL String Types: VARCHAR, TEXT, CHAR, and MoreUnderstanding MySQL String Types: VARCHAR, TEXT, CHAR, and MoreMay 10, 2025 am 12:02 AM

MySQLstringtypesincludeVARCHAR,TEXT,CHAR,ENUM,andSET.1)VARCHARisversatileforvariable-lengthstringsuptoaspecifiedlimit.2)TEXTisidealforlargetextstoragewithoutadefinedlength.3)CHARisfixed-length,suitableforconsistentdatalikecodes.4)ENUMenforcesdatainte

What are the String Data Types in MySQL?What are the String Data Types in MySQL?May 10, 2025 am 12:01 AM

MySQLoffersvariousstringdatatypes:1)CHARforfixed-lengthstrings,2)VARCHARforvariable-lengthtext,3)BINARYandVARBINARYforbinarydata,4)BLOBandTEXTforlargedata,and5)ENUMandSETforcontrolledinput.Eachtypehasspecificusesandperformancecharacteristics,sochoose

How to Grant Permissions to New MySQL UsersHow to Grant Permissions to New MySQL UsersMay 09, 2025 am 12:16 AM

TograntpermissionstonewMySQLusers,followthesesteps:1)AccessMySQLasauserwithsufficientprivileges,2)CreateanewuserwiththeCREATEUSERcommand,3)UsetheGRANTcommandtospecifypermissionslikeSELECT,INSERT,UPDATE,orALLPRIVILEGESonspecificdatabasesortables,and4)

How to Add Users in MySQL: A Step-by-Step GuideHow to Add Users in MySQL: A Step-by-Step GuideMay 09, 2025 am 12:14 AM

ToaddusersinMySQLeffectivelyandsecurely,followthesesteps:1)UsetheCREATEUSERstatementtoaddanewuser,specifyingthehostandastrongpassword.2)GrantnecessaryprivilegesusingtheGRANTstatement,adheringtotheprincipleofleastprivilege.3)Implementsecuritymeasuresl

MySQL: Adding a new user with complex permissionsMySQL: Adding a new user with complex permissionsMay 09, 2025 am 12:09 AM

ToaddanewuserwithcomplexpermissionsinMySQL,followthesesteps:1)CreatetheuserwithCREATEUSER'newuser'@'localhost'IDENTIFIEDBY'password';.2)Grantreadaccesstoalltablesin'mydatabase'withGRANTSELECTONmydatabase.TO'newuser'@'localhost';.3)Grantwriteaccessto'

MySQL: String Data Types and CollationsMySQL: String Data Types and CollationsMay 09, 2025 am 12:08 AM

The string data types in MySQL include CHAR, VARCHAR, BINARY, VARBINARY, BLOB, and TEXT. The collations determine the comparison and sorting of strings. 1.CHAR is suitable for fixed-length strings, VARCHAR is suitable for variable-length strings. 2.BINARY and VARBINARY are used for binary data, and BLOB and TEXT are used for large object data. 3. Sorting rules such as utf8mb4_unicode_ci ignores upper and lower case and is suitable for user names; utf8mb4_bin is case sensitive and is suitable for fields that require precise comparison.

MySQL: What length should I use for VARCHARs?MySQL: What length should I use for VARCHARs?May 09, 2025 am 12:06 AM

The best MySQLVARCHAR column length selection should be based on data analysis, consider future growth, evaluate performance impacts, and character set requirements. 1) Analyze the data to determine typical lengths; 2) Reserve future expansion space; 3) Pay attention to the impact of large lengths on performance; 4) Consider the impact of character sets on storage. Through these steps, the efficiency and scalability of the database can be optimized.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment