You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2015/06/18 22:33:21 UTC
vxquery git commit: The default EXRT queries for DB2 before being
modified for VXQuery.
Repository: vxquery
Updated Branches:
refs/heads/master 9d75b2a2f -> 169e71a9f
The default EXRT queries for DB2 before being modified for VXQuery.
Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/169e71a9
Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/169e71a9
Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/169e71a9
Branch: refs/heads/master
Commit: 169e71a9fd2e14e30f97eb0ecec044d168608a9a
Parents: 9d75b2a
Author: Preston Carman <pr...@apache.org>
Authored: Thu Aug 14 14:53:48 2014 -0700
Committer: Eldon Carman <ec...@ucr.edu>
Committed: Thu Jun 18 13:33:03 2015 -0700
----------------------------------------------------------------------
.../src/main/resources/exrt/README.md | 29 +++++
.../src/main/resources/exrt/queries/q01.xq | 31 +++++
.../src/main/resources/exrt/queries/q02.xq | 27 +++++
.../src/main/resources/exrt/queries/q03.xq | 47 ++++++++
.../src/main/resources/exrt/queries/q04.xq | 118 +++++++++++++++++++
.../exrt/queries/q04_without_reconstruction.xq | 21 ++++
.../src/main/resources/exrt/queries/q05.xq | 23 ++++
.../src/main/resources/exrt/queries/q06.xq | 22 ++++
.../src/main/resources/exrt/queries/q07.xq | 22 ++++
.../src/main/resources/exrt/queries/q08.xq | 25 ++++
.../src/main/resources/exrt/queries/q09.xq | 25 ++++
11 files changed, 390 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/README.md
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/README.md b/vxquery-benchmark/src/main/resources/exrt/README.md
new file mode 100644
index 0000000..501a68f
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/README.md
@@ -0,0 +1,29 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+EXRT
+=====
+
+# Description
+
+The original EXRT queries and data generation are outlined in "Exrt: Towards
+a simple benchmark for xml readiness testing." [1]
+
+
+1. Carey, Michael J., et al. "Exrt: Towards a simple benchmark for xml readiness
+testing." Performance Evaluation, Measurement and Characterization of Complex
+Systems. Springer Berlin Heidelberg, 2011. 93-109.
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/queries/q01.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/queries/q01.xq b/vxquery-benchmark/src/main/resources/exrt/queries/q01.xq
new file mode 100644
index 0000000..b2ed1e4
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/queries/q01.xq
@@ -0,0 +1,31 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License. :)
+
+(: EXRT Query see README.md for full details. :)
+
+declare default element namespace "http://tpox-benchmark.com/custacc";
+for $cust in db2-fn:xmlcolumn('CUSTACC.CADOC')/Customer[@id >= |1 and @id < |2 + |3 ]
+return element Profile {
+ attribute CustomerId { $cust/@id },
+ element Name {
+ $cust/Name/Title,
+ $cust/Name/FirstName,
+ $cust/Name/LastName,
+ $cust/Name/Suffix
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/queries/q02.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/queries/q02.xq b/vxquery-benchmark/src/main/resources/exrt/queries/q02.xq
new file mode 100644
index 0000000..a0fa04e
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/queries/q02.xq
@@ -0,0 +1,27 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License. :)
+
+(: EXRT Query see README.md for full details. :)
+
+declare default element namespace "http://tpox-benchmark.com/custacc";
+for $cust in db2-fn:xmlcolumn('CUSTACC.CADOC')/Customer[@id >= |1 and @id < |2 + |3]
+return element Profile{
+ attribute CustomerId {$cust/@id},
+ element ShortNames{$cust/ShortNames/ShortName},
+ element Name{$cust/Name/Title, $cust/Name/FirstName, $cust/Name/MiddleName, $cust/Name/LastName, $cust/Name/Suffix},
+ element Languages{$cust/Languages/Language}
+}
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/queries/q03.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/queries/q03.xq b/vxquery-benchmark/src/main/resources/exrt/queries/q03.xq
new file mode 100644
index 0000000..d1ccdfa
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/queries/q03.xq
@@ -0,0 +1,47 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License. :)
+
+(: EXRT Query see README.md for full details. :)
+
+declare default element namespace "http://tpox-benchmark.com/custacc";
+for $cust in db2-fn:xmlcolumn('CUSTACC.CADOC')/Customer[@id >= |1 and @id < |2 + |3]
+return element Profile{
+ attribute CustomerId {$cust/@id},
+ element ShortNames{$cust/ShortNames/ShortName},
+ element Name {$cust/Name/Title, $cust/Name/FirstName, $cust/Name/MiddleName, $cust/Name/LastName, $cust/Name/Suffix },
+ $cust/DateOfBirth,
+ $cust/Gender,
+ $cust/Nationality,
+ $cust/CountryOfResidence,
+ element Languages{ $cust/Languages/Language },
+ element Addresses{
+ for $ad in $cust/Addresses/Address
+ return element Address{
+ attribute primary {$ad/@primary},
+ attribute type {$ad/@type},
+ element gStreet { $ad/gStreet/Street },
+ $ad/POBox,
+ $ad/City,
+ $ad/PostalCode,
+ $ad/State,
+ $ad/Country,
+ $ad/CityCountry,
+ element Phones{ $ad/Phones/Phone }
+ },
+ element EmailAddresses { $cust/Addresses/EmailAddresses/Email}
+ }
+}
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/queries/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/queries/q04.xq b/vxquery-benchmark/src/main/resources/exrt/queries/q04.xq
new file mode 100644
index 0000000..21dc10e
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/queries/q04.xq
@@ -0,0 +1,118 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License. :)
+
+(: EXRT Query see README.md for full details. :)
+
+declare default element namespace "http://tpox-benchmark.com/custacc";
+for $cust in db2-fn:xmlcolumn('CUSTACC.CADOC')/Customer[@id >= |1 and @id < |2 + |3]
+return
+ element Profile{
+ attribute CustomerId {$cust/@id},
+ $cust/Mnemonic,
+ element ShortNames{
+ $cust/ShortNames/ShortName
+ },
+ element Name {
+ $cust/Name/Title,
+ $cust/Name/FirstName,
+ $cust/Name/MiddleName,
+ $cust/Name/LastName,
+ $cust/Name/Suffix
+ },
+ $cust/DateOfBirth,
+ $cust/Gender,
+ $cust/Nationality,
+ $cust/CountryOfResidence,
+ element Languages{ $cust/Languages/Language },
+ element Addresses{
+ for $ad in $cust/Addresses/Address
+ return
+ element Address{
+ attribute primary {$ad/@primary},
+ attribute type {$ad/@type},
+ element gStreet { $ad/gStreet/Street },
+ $ad/POBox,
+ $ad/City,
+ $ad/PostalCode,
+ $ad/State,
+ $ad/Country,
+ $ad/CityCountry,
+ element Phones{ $ad/Phones/Phone }
+ },
+ element EmailAddresses { $cust/Addresses/EmailAddresses/Email }
+ },
+ element BankingInfo {
+ $cust/BankingInfo/CustomerSince,
+ $cust/BankingInfo/PremiumCustomer,
+ $cust/BankingInfo/CustomerStatus,
+ $cust/BankingInfo/LastContactDate,
+ $cust/BankingInfo/ReviewFrequency,
+ element Online {
+ $cust/BankingInfo/Online/Login,
+ element Pin{
+ element EncryptedData {
+ attribute Type { $cust/BankingInfo/Online/Pin/EncryptedData/@Type },
+ element CipherData { $cust/BankingInfo/Online/Pin/EncryptedData/CipherData/CipherValue }
+ }
+ },
+ element Trading-password {
+ element EncryptedData {
+ attribute Type { $cust/BankingInfo/Online/Trading-password/EncryptedData/@Type },
+ element CipherData { $cust/BankingInfo/Online/Trading-password/EncryptedData/CipherData/CipherValue }
+ }
+ }
+ },
+ element Tax {
+ $cust/BankingInfo/Tax/TaxID,
+ element SSN {
+ element EncryptedData {
+ attribute Type { $cust/BankingInfo/Tax/SSN/EncryptedData/@Type },
+ element CipherData { $cust/BankingInfo/Tax/SSN/EncryptedData/CipherData/CipherValue }
+ }
+ },
+ $cust/BankingInfo/Tax/TaxRate
+ },
+ $cust/BankingInfo/Currency
+ },
+ element Accounts {
+ for $a in $cust/Accounts/Account
+ return
+ element Account{
+ $a/Category,
+ $a/AccountTitle,
+ $a/ShortTitle,
+ $a/Mnemonic,
+ $a/Currency,
+ $a/CurrencyMarket,
+ $a/OpeningDate,
+ $a/AccountOfficer,
+ $a/LastUpdate,
+ element Balance {
+ $a/Balance/OnlineActualBal,
+ $a/Balance/OnlineClearedBal,
+ $a/Balance/WorkingBalance
+ },
+ $a/Passbook,
+ element gValueDate { $a/gValueDate/mValueDate },
+ $a/ChargeCcy,
+ $a/InterestCcy,
+ $a/AllowNetting,
+ element gInputter { $a/gInputter/Inputter },
+ $a/Holdings
+ }
+ }
+ }
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/queries/q04_without_reconstruction.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/queries/q04_without_reconstruction.xq b/vxquery-benchmark/src/main/resources/exrt/queries/q04_without_reconstruction.xq
new file mode 100644
index 0000000..ccea57f
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/queries/q04_without_reconstruction.xq
@@ -0,0 +1,21 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License. :)
+
+(: EXRT Query see README.md for full details. :)
+
+declare default element namespace "http://tpox-benchmark.com/custacc";
+db2-fn:xmlcolumn('CUSTACC.CADOC')/Customer[@id >= |1 and @id < |2 + |3]
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/queries/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/queries/q05.xq b/vxquery-benchmark/src/main/resources/exrt/queries/q05.xq
new file mode 100644
index 0000000..7bc04b4
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/queries/q05.xq
@@ -0,0 +1,23 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License. :)
+
+(: EXRT Query see README.md for full details. :)
+
+declare default element namespace "http://tpox-benchmark.com/custacc";
+for $cust in db2-fn:xmlcolumn('CUSTACC.CADOC')/Customer
+where $cust[@id >= |1 and @id < ( |2 + |3 )]
+return $cust/Accounts
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/queries/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/queries/q06.xq b/vxquery-benchmark/src/main/resources/exrt/queries/q06.xq
new file mode 100644
index 0000000..2a3c93a
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/queries/q06.xq
@@ -0,0 +1,22 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License. :)
+
+(: EXRT Query see README.md for full details. :)
+
+declare default element namespace "http://tpox-benchmark.com/custacc";
+for $account in db2-fn:xmlcolumn('CUSTACC.CADOC')/Customer/Accounts/Account[@id > '|1' and @id < '|2']
+return $account
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/queries/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/queries/q07.xq b/vxquery-benchmark/src/main/resources/exrt/queries/q07.xq
new file mode 100644
index 0000000..bf4613f
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/queries/q07.xq
@@ -0,0 +1,22 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License. :)
+
+(: EXRT Query see README.md for full details. :)
+
+declare default element namespace "http://tpox-benchmark.com/custacc";
+for $cust in db2-fn:xmlcolumn('CUSTACC.CADOC')/Customer where $cust/Accounts/Account[@id >= '|1' and @id < '|2']
+return $cust
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/queries/q08.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/queries/q08.xq b/vxquery-benchmark/src/main/resources/exrt/queries/q08.xq
new file mode 100644
index 0000000..1c23d81
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/queries/q08.xq
@@ -0,0 +1,25 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License. :)
+
+(: EXRT Query see README.md for full details. :)
+
+declare default element namespace "http://tpox-benchmark.com/custacc";
+fn:avg(
+ for $cust in db2-fn:xmlcolumn('CUSTACC.CADOC')/Customer
+ where $cust/Nationality = '|1'
+ return fn:count($cust/Accounts/Account)
+)
http://git-wip-us.apache.org/repos/asf/vxquery/blob/169e71a9/vxquery-benchmark/src/main/resources/exrt/queries/q09.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/exrt/queries/q09.xq b/vxquery-benchmark/src/main/resources/exrt/queries/q09.xq
new file mode 100644
index 0000000..69e5b76
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/exrt/queries/q09.xq
@@ -0,0 +1,25 @@
+(: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License. :)
+
+(: EXRT Query see README.md for full details. :)
+
+declare default element namespace "http://tpox-benchmark.com/custacc";
+fn:avg(
+ for $cust in db2-fn:xmlcolumn('CUSTACC.CADOC')/Customer
+ where $cust/BankingInfo/Tax/TaxRate > |1 and $cust/Addresses/Address[@primary = 'Yes' and Country = '|2']
+ return fn:sum($cust/Accounts/Account/Balance/OnlineActualBal/text())
+)
\ No newline at end of file