Parade: PARallel Active Database Engine

Copyright (C) 1996-1998 by Haruo Yokota,
Japan Advanced Inst. of Sci. and Tech.,
1-1 Asahidai, Tatsunokuchi, Ishikawa 923-1292, Japan.

Contents

Features of this software
Required Environment
Directories
Installation
Usage
Command accepted by SQL client
SQL examples
Commands accepted by Parade server
Note


Features of the Software

This software is an experimental parallel active database system which enhances traditional database functionality with powerful rule processing capabilities. The rules are defined by users to specify the desired active behavior that in passive database system must be encoded in applications.

The software has the following functions:


Required Environment


Directories

Expanded directory has the following directories:

COPYRIGHT -- copyright
Readme-E.html -- (HTML) README in English
Readme-J.html -- (HTML) README in Japanese
use-of-software-E -- (TEXT) conditions for use of this software in English
use-of-software-J -- (TEXT) conditions for use of this software in Japanese
rdbhosts -- registration file for the SQL servers
Makefile -- makefile
doc/ -- documents in Japanese
common/ -- common use source and relations
client/ -- common source of clients
sqlclt/ -- common source of SQL client
oqlclt/ -- common source of OQL client
server/ -- common source of Parade server
coding/ -- source for enhancing termio
util/ -- source of utility (ex. append)
rel/ -- readable relations
newrel/ -- encoded relations (automatically generated at the install)
sun/ -- proper source for unix (SUN) workstations
client/ -- clients for unix workstations
sqlclt/ -- SQL client for unix workstations
oqlclt/ -- OQL client for unix workstations
javaQBE/ -- QBE client for unix workstations
server/ -- Parade server for unix workstations
socket/ -- source of socket and parallel I/O for unix workstations
ncube/ -- proper source for nCUBE2 parallel machines
client/ -- SQL client for nCUBE2
server/ -- Parade server for nCUBE2
socket/ -- source of socket and parallel I/O for nCUBE2


Installation

Install into a unix workstation (ex. sun)
"make" or "make sun" at the top directory

Install into an nCUBE2 machine
Prepare KLIC for nCUBE2
If you do not have KLIC for nCUBE2, please contact:
Email: miyazaki@jaist.ac.jp
"make ncube" at the top directory in the host machine of nCUBE2


Usage

Parade server on SUN
Go to the directory of server
sun1> cd sun/server
Execute server
sun1> ./rdbserv
Default port number is 12345.
If you want to change the port number to 23456,
sun1> ./rdbserv 23456

SQL client for SUN Server
Go to the directory of client for SUN
sun2> cd sun/client/sqlclt
Execute client
sun2> ./sqlclt server: sun1 port: 12345 echo: off
or
sun2> ./sqlclt
Server Machine: sun1.
Server Port: 12345.
Echo: off.

Parade server on nCUBE2
Go to the directory of server
ncube> cd ncube/server
Execute server (ex. using 4 processors in 3 dimensions)
ncube> xnc -d3 ./rdbserv -p4

SQL client for nCUBE Server
Go to the directory of client for nCUBE
sun3> cd ncube/client
Execute client
sun3> ./sqlclt server: ncube port: 12345 echo: off


Commands accepted by SQL client

start transaction
commit transaction
rollback transaction
abortall transaction
create table "TABLE"
attribute("ATTNAME", ATTNUNBER, "TYPE", LENGTH)
primary_key("TYPE", NUMBER)
partitions("TYPE", "DISK")
parallel_disk({DISK_NUMBER, DISKDIROFROOT, DISKDIROFLEAF...})
page(PAGESIZE(K), MAXCHILDNO, MAXRECORDNO)
insert into "TABLE"
values([TUPLE])
delete "TABLE"
drop table "TABLE"
defrule "RULE"
undefrule
echo "STRING"
select "ATT",... / count / sum("ATT") / avg("ATT") / max("ATT") / min("ATT")
where EXPRESSION
from ``TABLE'',...
and / or
= / < / > / =< / =< / \= / in
order by ``ATT''
group by ``ATT''
having EXPRESSION
end


SQL examples

Create a relation based on KLIC I/O:
SQL> create table work.
SQL> attribute("number", 1, "integer", 4).
SQL> attribute("name", 2, "char", 20).
SQL> partitions(flat,"../../common/newrel/work").
SQL> end.

Create a relation based on page I/O:

SQL> create table workp.
SQL> attribute("number", 1, "integer", 4).
SQL> attribute("name", 2, "char", 20).
SQL> partitions(page,"../../common/newrel/workp").
SQL> end.

Create a relation with Btree index:

SQL> create table sampleb.
SQL> attribute("number", 1, "integer", 7).
SQL> attribute("yomi", 2, "char", 10).
SQL> partitions(btree, "../../common/newrel/btree/sampleb",1,1).
SQL> parallel_disk({2,"../../common/newrel/btree/sasmpleb", "../../common/newrel/btree1/","../../common/newrel/btree2/"}).
SQL> primary_key(int, 1).
SQL> page(4, 200, 40).
SQL> end.

Insert tuples:

SQL> insert into work.
SQL> values([1,"foo"]).
SQL> values([2,"hoge"]).
SQL> values([3,"bar"]).
SQL> values([4,"afo"]).
SQL> end.

Delete tuples:

SQL> delete.
SQL> from work.
SQL> where number=2.
SQL> end.

Declaration of a transaction:

SQL> start transaction.
SQL> insert into work.
SQL> values([5,"bfo"]).
SQL> end.
SQL> commit transaction.

Rollback the sub-transaction:

SQL> start transaction.
SQL> delete
SQL> from work.
SQL> where number=1.
SQL> end.
SQL> rollback transaction.

Abort the root transaction:

SQL> insert into work.
SQL> values([5,"bfo"]).
SQL> end.
SQL> abortall transaction.

Drop a relation:

SQL> drop table work.
SQL> end.

Get relation without conditions:

SQL> select * .
SQL> from emp.
SQL> end.

Selection1:

SQL> select ename, job, sal, comm.
SQL> from emp.
SQL> where job="manager" or ( sal > [3000] and deptno = [10] ).
SQL> end.

Selection2:

SQL> select ename, dept.
SQL> from emp.
SQL> where dept in [20, 30].
SQL> end.

Join (nested):

SQL> select empno, job, dept.
SQL> from emp.
SQL> where dept = next.
SQL> select dept.
SQL> from dept.
SQL> where location = next.
SQL> select location.
SQL> from location.
SQL> where name = "Sighthill".
SQL> end.

Join:

SQL> select * .
SQL> from emp, dept.
SQL> where emp.dept = dept.dept.
SQL> end.

Count:

SQL> select count.
SQL> from emp.
SQL> where job="manager".
SQL> end.

Group by

SQL> select job, avg(sal).
SQL> from emp.
SQL> group by job.
SQL> end.

Add a rule

SQL> defrule "tmp".
SQL> when retrieve(work).
SQL> if true.
SQL> then immidiate.
SQL> echo "warning".
SQL> end.

Delete a rule

SQL> undefrule.
SQL> where name="tmp".
SQL> end.

Please find examples in "common/input"


Commands accepted by Parade server

[start_transaction]
[commit_transaction]
[rollback_transaction]
[abortall_transaction]
[echo(STRING)]
[create(RELNAME, PARAMETER)]
[drop(RELNAME)]
[insert(RELNAME, LISTOFTUPLES)]
[delete(RELNAME, LISTOFTUPLES)]
[get_relation(RELNAME)]
[join(INRELNAME1, INRELNAME2, CONDITION, OUTRELNAME)]
[selection(INRELNAME, CONDITION, OUTRELNAME)]
[projection(INRELNAME, ATTLIST, OUTRELNAME)]
[difference_rdb(INRELNAME1, INRELNAME2, OUTRELNAME)]
[sort_rdb(INRELNAME, CONDITION, OUTRELNAME)]
[group_by(INRELNAME, ATT, OUTRELNAME)]
[count_rdb(INRELNAME, OUTRELNAME)]
[sum_rdb(INRELNAME, ATT, OUTRELNAME)]
[avg_rdb(INRELNAME, ATT, OUTRELNAME)]
[max_rdb(INRELNAME, ATT, OUTRELNAME)]
[min_rdb(INRELNAME, ATT, OUTRELNAME)]
[copy_rdb(INRELNAME, OUTRELNAME)]


Note

  • This software is still under development, and not guaranteed the normal behavior.
  • Currently, tables created or dropped by a client are not reflected to the other clients automatically. To reflect these operations, these clients should be restarted.
  • Socket communication in Sun Workstations uses asynchronous I/O having some bugs of OS or KLIC, and may hang-up at start up time. At that case, restart the client or server.
  • For NEWS-OS 6.1.X, default in /etc/socketconf should be changed from syscall to sockmod.