Introduction to the SPDBMS A prototype semistructured probabilistic database system (SPDBMS) has been implemented on top of a RDBMS in Java, JDK1.3. The core of the system is the SPDBMS application server which processes query requests from a variety of client applications. The application server provides a JDBC-like API, through which client applications can send standard database management instructions, such as CREATE SP-RELATION, DROP SP-RELATION, INSERT INTO SP-RELATION, DELETE FROM SP-RELATION, as well as SP-Algebra queries to the server. Enclosed is the draft of SPDBMS Query Language syntax. Syntax for SPDBMS Query Language 1. Data Definition Language a) Creation: Create sp-relation {CREATE} sp-relation-name [schema-name] b) Drop sp-relation {DROP} sp-relation-name c) Insert spos into sp-relation {INSERT INTO} sp-relation-name filename {INSERT INTO} sp-relation-name xmldata-string d) Delete spos fron sp-relation {DELETE FROM} sp-relation-name {WHERE} condition 2. SP-Algebra Query Language a) Atomic Queries Type of Queries Sample queries Selection: Selection on Context: S[cnt.race = Asian]($sp-relation-name) S[cnt.race IN C]($sp-relation-name) Selection on Conditional: S[cnd.DR = A]($sp-relation-name) S[cnd.DR IN C]($sp-relation-name) Selection on Variable: S[var.MS IN V]($sp-relation-name) Selection on Table: S[tbl.MS = A]($sp-relation-name) Selection on Probability: S[pro.p > 0.1]($sp-relation-name) Projection: Projection on Context: P[cnt.race]($sp-relation-name) Projection on Conditional: P[cnd.DR]($sp-relation-name) Projection on Variable: P[var.MS]($sp-relation-name) Conditionalization: Conditionalization on Table: C[tbl.MS = A]($sp-relation-name) Cartesian Product: X(($sp-relation-name1) ($sp-relation-name2)) or X((atomic-query1) (atomic-query2)) Join: J(($sp-relation-name1) ($sp-relation-name2)) or J((atomic-query1) (atomic-query2)) b) Structured Queries Conjuctive (AND), disjunctive (OR), and negative (NOT) predicates are supported. The current system supports any queries with predicates in CNF. Queries can be also nested, meaning that you can always replace a sp-relation (i.e. $sp-relation-name) with another query. Sample query: S[cnt.race = Asian AND cnd.DR IN C](J(S[cnt.year = 2000 OR NOT(var.LY IN V)] ($S1)) (C[tbl.MS = A]($S2))) Notes: 1. For all types of Queries, the Xconnection class (provides JDBC-like APIs) will add a prefix of either "QUERY XML" or "QUERY HTML" which specifies the return format. 2. Abbreviations: cnt:context; var:variable; tbl:table; pro:probability; cnd:conditional. 3. The keywords above in { } are all added by the Xconnection class, and values in [ ] are optional. 4. Always put $sp-relation-name within ( ). 5. You will use Xconnection class to connect to the SPDBMS, and send queries to SPDBMS. For usage of the APIs of Xconnection, take a look at the MainClient class. 6. SPDBMS java docs URL: http://www.cs.unm.edu/~wzhao/spo/javadocs/api/