[SQL] SQL4. I ask you to help in development (or critic).

2007-04-02 Thread sql4-en.narod.ru
SQL4 is project of novation technology in DBMS.
I ask you to help in development (or critic).

SQL4 consist of DDL, DML and TML (Tree Manipulation Language).
TML4 is new advanced query language, which processes trees and counts in 
database,
put them into it, and get them from it (tree's model of data is over rational 
model). 

SQL 4.0.4 is project of novations:
* DDL4 installs right of access to each record
* TML considers records of tables, bound by foreign key, as elements of tree.
  It's un-important, next element of tree is
  parental table or branch table - it's necessary only foreign key between two 
tables
  Elements of tree can be a set and a list
* TML uses mask for specification necessary sub-trees,
  inserts and deletes elements of sets, of lists, and also whole sub-trees,
  changes values of field in any nodes of tree
* DBMS transform got XML into records of tables;
  transform records of tables, bound by foreign keys, into XML
* Way to solve collision is specified, when one record is bound
  with several records of other tables
* Communication with external world occurs by HTTP,
  that at least one of possible client of DBMS
  could communicate with it without middle-ware.
  Client gets picture from database by its URL and
  separately from XML-data

Documentation is on http://sql40.chat.ru


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


[SQL] new idea

2007-04-08 Thread sql4-en.narod.ru
Let me know your opinion about next way of processing and extracting data.
This would very comfortable for delivery xml-data into any program, for example 
into browser.
Has this idea future ? What are you think ?

1. For exaple, you create SET:

create table a (
  id   num  primary key;
  data float;
);
create table b (
  id   num  primary key;
  ref  num  references a(id);
  data float;
);
create table c (
  id   num  primary key;
  link num  references b(id);
  data float;
);
insert into a values (1, 12.3);
insert into b values (10, 1, 23.4);
insert into b values (20, 1, 34.5);
insert into b values (30, 1, 45.6);
insert into c values (100,10,56.7);
insert into c values (101,10,67.8);
insert into c values (200,20,78.9);
insert into c values (201,20,89.1);
insert into c values (300,30,91.2);

Request "a.b.c" (of Tree Manipulation Language :) ) will return the following
(term "SET" means, that first table in request is parental table,
next table is branch table)


  


  
  


  
  

  


2. For exaple, you create RELAY-RACE:

create table a (
  id   num  primary key;
  ref  num  references b(id);
  data float;
);
create table b (
  id   num  primary key;
  link num  references c(id);
  data float;
);
create table c (
  id   num  primary key;
  data float;
);
insert into с values (100,34.5);
insert into b values (10, 100,23.4);
insert into a values (1,  10, 12.3);

Request "a.b.c" will return the following
(term "RELAY-RACE" means, that first table in request is branch table,
next table is parental table)


  

  


---

Let's consider more complicated cases.

1. complicated case for "set"

create table a (
  id   num  primary key;
  data float;
);
create table b (
  id   num  primary key;
  ref1 num  references a(id);
  ref2 num  references a(id);
  data float;
);
create table c (
  id   num  primary key;
  lnk1 num  references b(id);
  lnk2 num  references b(id);
  data float;
);
insert into a values (1,12.3);
insert into a values (2,23.4);
insert into b values (10, 1, 2, 34.5);
insert into b values (20, 1, 2, 45.6);
insert into b values (30, 1, 2, 56.7);
insert into b values (40, 1, 2, 67.8);
insert into c values (100,10,20,78.9);
insert into c values (101,10,20,89.1);
insert into c values (200,30,40,91.2);
insert into c values (201,30,40,88.8);

Request "a.b/ref1.c/lnk1" will return the following


  


  
  


  


2. complicated case for "relay-race"

create table a (
  id   num  primary key;
  ref1 num  references b(id);
  ref2 num  references b(id);
  data float;
);
create table b (
  id   num  primary key;
  lnk1 num  references c(id);
  lnk2 num  references c(id);
  data float;
);
create table c (
  id   num  primary key;
  data float;
);
insert into с values (201,78.9);
insert into с values (200,67.8);
insert into с values (101,56.7);
insert into с values (100,45.6);
insert into b values (20, 200,201,34.5);
insert into b values (10, 100,101,23.4);
insert into a values (1,  10, 20, 12.3);

Request "a/ref1.b/lnk1.c" will return the following


  

  




---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq