Home XML Database Xindice Introduction (version 1.0)

xiaoxiao2021-03-06  42

(Xindice's current version is 1.1B4, has made a big change, this article is a 1.0 version of the documentation translation, for reference only. Partial change is described in text.

---- Translator: KSU99)

What is xindice

The Xindice core server is completely a database server that stores XML data. In terms of terms, the Xindice server is the so-called Native XML Database (NXD). It can also be said to be a seamless XML database, which may be easily understood.

This means using this server, you can use XML tools and techniques to the best possible use. All data for the input and export servers are XML. The query language used is XPath, the programming API supports DOM and SAX. All of these should be very familiar with a developer who used to use XML in their applications. When dealing with XML data and Xindice, there is no mapping between different data modes. You only need to simply design data to store in XML.

All give you can summarize as a word: flexibility. XML provides an extremely flexible mechanism to model application data and allow you to build a model construct that is difficult to build in most traditional systems. This is the semi-structural model, which is the basic component in some applications. By using a source XML database (NXD) like Xindice, you can focus on building applications without having to worry about how complex XML structures map to the underlying data storage, or try to compare with a strict mode. Flexible data model.

After all, Xindice is a tool. It is suitable for some work, and it is completely wrong to others. It is best to store XML data. In fact, this is all. If you have a lot of XML data, then xindice may just be the tool you need. However, if your data is not XML or you need to accurately control the structure of the data, then you'd better use other database solutions.

(Translator Note: 1.1, server-side installation is now in a WAR file in the Java Servlet Engine (Tomcat). The database is deployed in a servlet engine and allows network access. This is different from version 1.0, because of version 1.0 Have your own server framework. This is because the original server framework repeats a lot of features of the Servlet engine, and the deployment option is more flexible after separation.)

Current state

Native XML Database Technology is a very new field, and Xindice is more projects that are still developing. The server currently supports the storage of a Well FORMED XML document. This means that there is no pattern to be constrained for documents that can be put into the document collection. This makes Xindice a semi-structured database and provides great flexibility in how to store data, but also give up some universal database functions, such as data types. [1] In the current state, Xindice is already a powerful tool for managing XML data. But there is still a lot to do.

This article tries to describe these current functions and can be used. Check the ReadMe document, which contains many information about the current state of the project.

Note: The Xindice server and this document are improved. Welcome and encourage any comments.

Characteristic summary

Document Collection: Document is stored in a collection that can be queried as a whole. You can create a collection that contains only the same type of document, or you can create a collection to store all documents. The database does not mind.

XPath Query Engine: To query the document collection, you can use the XPath defined by W3C. This provides a considerable flexibility mechanism to query the documentation through positioning and restrictions.

XML Index: In order to improve the performance of the query on a large number of documents, you can define an index of the element and attribute values. This can greatly accelerate the query response time.

XML: DB XUPDATE Implementation: When storeing an XML to the database, it may be possible to change the data without retrieving the entire document. XUPDATE is the mechanism that you need to do data update of the server. This is an XML-based language that determines XML modifications and allows these modifications to be applied to a single document as a single document.

Java XML: DB API implementation: A XML: DB API implementation is provided for Java programmers Xindice. This API will bring portability to XML database applications, just like JDBCs as related to relational databases. Applications developed for Xindice will use XML: DB API. (Translator Note: In version 1.1, there is an embedded version of XML: DB API, you can access the Database Meter Xindice application without using the network. This XML: DB API is fully compatible with the network.)

Xmlobjects: XMLObject provides a server extension mechanism to add additional functions for the server. They can be used to perform complex operations within the database engine to reduce network bandwidth, or increase the functionality that is not available on the current server. (Translator Note: The XMLOBJECTS in version 1.1 has been deleted.)

Command Line Management Tool: To help system administrators, Xindice provides a full set of command-driven management tools. All things you can do through XML: DB API can also get from the command line. (Translator Note: The XindiceAdmin tool has been deleted. You can only be done by xindice command through xindice command. This makes the server operation easier. The command line tool adds an option, allowing XPath Query to use Namespaces specification.)

CORBA NetWork API: For developers who are willing to use Java, Xindice provides a CORBA API to build applications. All functions available via XML: DB API can be implemented via CORBA API. In fact, XML: DB API is built on the Corba API. Although most Java developers will never need to know the existence of the CORBA API. (Translator Note: 1.1, Network Access API is based on XML-RPC instead of CORBA. All code related to CORBA has been removed from the system. The system now fully supports UTF-8 encoding.)

Module Architecture: The Xindice server consists in very modular way. This makes it easy to increase and decrease the component to crop the server, make it a special work platform, or embed it into another application.

Database structure

The Xindice server is designed to store the XML document collection. The collection can be arranged in hierarchies, similar to typical UNIX or Windows file systems.

In Xindice, data storage is based on a database instance that can also be used as a document collection. This database instance can contain any number of subsets. In the case of Xindice's default installation, this database instance is called "DB", and all set paths start in / dB. If you want to rename this database instance, although there is no need to do this.

The reference to Collection is the same as the reference to the layer-based file system.

1.1. Collection path instance

If you created a collection called my-collection under "DB", there is a collection named my-child-collection, the path to the MY-CHILD-Collection collection will be:

/ db / my-collection / my-child-collection can store several types of objects within a collection. You can store XML documents, XMLObject, and other collections. These objects can also be referenced by paths.

1.2. Collection path specifies a document

Extended the previous example, add a document called My-Document in My-Child-Collection, this document can be referenced by the following path:

/ db / my-collection / my-child-color ion / my-document

However, this path can only get one. Because you may have more than one synonymous object [2] in a collection, there is a priority order problem when calculating a path. The priority is in turn, XMLObject, documentation. That is to say, if there is a document and a collection with a name, you will not be able to retrieve the document. [3]

You can also access a collection on the remote computer by specifying the host and server port number.

1.3. Collection Path Specifies a remote document

If the previous example is on a remote computer, the path will be like this:

Myhost.domain.com:4080/db/my-collection/my-child-collection/my-document

This can also be used in the form of the following xindice uri:

Xindice: //myhost.domain.com: 4080 / db / my-collection / my-child-collection / my-document

[1] XML Mode Support will be added to the release of Xindice. Mode is always optional, but it can be used to force a set to store specific document types and allow data type support

[2] For example, a subset and a document

[3] This constraint will be adjusted in the release behind Xindice

转载请注明原文地址:https://www.9cbs.com/read-77956.html

New Post(0)