Run xpath queries against sqlite

In Progress

We have an sqlite database that stores the records in xml format. The schema is (simplified)


uuid CHAR(32) NOT NULL,



Where the content is an XML data.

This project has two phases mainly for you to understand what we need

Phase#1 (extremely slow version)


For each row in the msg table

run xpath against the msg.content.

Merge the results

The problem with this is that each row must be visited to get the results. If the table is large this wont scale at all.

In the second phase, which is what we actually need, we need you to use FTS2 (<[url removed, login to view]>) to preselect the rows to avoid running the query against all rows. We need you to update the algorithm as follows


sqlite> select uuid from msg where contents match '<terms-in-xpath>';

for each row in the returned set

run xpath against the msg.content.

Merge the results

For example,

If the xpath query is "author[last-name = "Bob"]", then FTS2 query should be

sqlite> select uuid from msg where contents match 'author last-name Bob';

This will reduce the results to a managable size and then individual xpath queries can run against the result set.

The major complications are:

1. Detect the "OR" and "NOT" expressions (e.g., author[last-name = "Bob" or first-name = "Alice"])

2. Eliminate predefined XPATH functions (e.g., author[last()] where the term 'last' should not be part of the query)

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

PHP 5.x

Skills: Database Administration, Engineering, MySQL, PHP, Software Architecture, Software Testing, SQL, XML, XSLT

See more: sqlite xpath, sqlite xml query, sqlite xml xpath, xpath sqlite, xpath query sqlite, sqlite xpath query, xpath sqlite queries, xpath and or, what stores hire at 14, what's an algorithm, what is an algorithm, schema update, schema form, program algorithm example, match 3 algorithm, algorithm functions, sqlite xpath queries, sqlite select xpath, second last name, hire an author, u run, sqlite, run, queries, database queries

About the Employer:
( 334 reviews ) United States

Project ID: #2845564

Awarded to:


See private message.

$212.5 USD in 24 days
(20 Reviews)