Parade: PARallel Active Database Engine

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

Contents

Directories
Installation
Usage
Command accepted by SQL client
SQL examples
Commands accepted by Parade server
Note


Directories

Expanded directory has the following directories:

doc/ -- documents
common/ -- common use source and relations
client/ -- common source of SQL 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)
input/ -- examples of SQL sentences
sun/ -- proper source for unix (SUN) workstations
client/ -- SQL 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
Execute client
sun2> ./sqlclt sun1 12345
or
sun2> ./sqlclt
Server Machine: sun1.
Server Port: 12345.

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 ncube 12345


Commands accepted by SQL client

start_transaction
commit_transaction
rollback_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"
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:
SQL> create table "samplef".
SQL> attribute("number", 1, "integer", 7).
SQL> attribute("yomi", 2, "char", 10).
SQL> partitions(flat,"../../common/newrel/samplef").
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.

Drop a relation:

SQL> drop table "samplef".
SQL> end.

Insert tuples:

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

Delete tuples:

SQL> delete "samplef".
SQL> where "number" >= [3].
SQL> end.

Declaration of a transaction:

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

Abort the transaction:

SQL> start transaction.
SQL> delete "samplef".
SQL> where "number" = [1].
SQL> end.
SQL> rollback transaction.

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", "deptno".
SQL> from "emp".
SQL> where "deptno" in [10,30].
SQL> end.

Join (nested):

SQL> select "empno", "job", "deptno".
SQL> from "emp".
SQL> where "deptno" = next.
SQL> select "deptno".
SQL> from "dept".
SQL> where "loc" = ["newyork"].
SQL> end.

Join:

SQL> select * .
SQL> from "emp", "dept".
SQL> where "emp"-"deptno" = "dept"-"deptno".
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.

Please find examples in "common/input"


Commands accepted by Parade server

[start_transaction]
[commit_transaction]
[rollback_transaction]
[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 right 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 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 form syscall to sockmod.