Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 8706C9FA65C for ; Mon, 9 Apr 2007 03:40:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 46831-10 for ; Mon, 9 Apr 2007 03:40:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtp3.yandex.ru (smtp3.yandex.ru [213.180.200.14]) by postgresql.org (Postfix) with ESMTP id 1A9329FA161 for ; Mon, 9 Apr 2007 03:40:54 -0300 (ADT) Received: from [82.209.238.118] ([82.209.238.118]:60428 "EHLO asup_tur" smtp-auth: "sql4-en" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S3588469AbXDIGkm (ORCPT ); Mon, 9 Apr 2007 10:40:42 +0400 X-Comment: RFC 2476 MSA function at smtp3.yandex.ru logged sender identity as: sql4-en Date: Mon, 9 Apr 2007 09:42:24 +0300 From: "sql4-en.narod.ru" X-Mailer: The Bat! (v2.01) Personal Reply-To: "sql4-en.narod.ru" X-Priority: 3 (Normal) Message-ID: <1266433218.20070409094224@narod.ru> To: pgsql-sql@postgresql.org Subject: new idea MIME-Version: 1.0 Content-Type: text/plain; charset=Windows-1251 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.243 tagged_above=0 required=5 tests=AWL=-0.399, BAYES_50=0.001, REPTO_OVERQUOTE_THEBAT=2.641 X-Spam-Level: ** X-Archive-Number: 200704/100 X-Sequence-Number: 28100 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