Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E80D21337BA8 for ; Wed, 1 Dec 2010 06:47:15 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 05981-09 for ; Wed, 1 Dec 2010 10:47:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from fe3.vsnl.net (fe3.vsnl.net [203.200.235.173]) by mail.postgresql.org (Postfix) with ESMTP id 4D86A1337BA7 for ; Wed, 1 Dec 2010 06:47:08 -0400 (AST) Received: from vsnl.net ([172.16.28.44]) by fe3.internal.vsnl.net (vsnl mail server fe3) with ESMTP id <0LCQ002IKWL0R4B0@fe3.internal.vsnl.net> for pgsql-hackers@postgresql.org; Wed, 01 Dec 2010 16:16:12 +0530 (IST) Received: from [172.16.28.177] (Forwarded-For: [117.195.43.4]) by store3.internal.vsnl.net (mshttpd); Wed, 01 Dec 2010 15:46:12 +0500 Date: Wed, 01 Dec 2010 15:46:12 +0500 From: ghatpande@vsnl.net Subject: Re: Proposal: First step towards Intelligent, integrateddatabase In-reply-to: <87F42982BF2B434F831FCEF4C45FC33E4209B193@EXCHANGE.corporate.connx.com> To: Dann Corbit Cc: pgsql hackers Message-id: MIME-version: 1.0 X-Mailer: Sun Java(tm) System Messenger Express 6.2-6.01 (built Apr 3 2006) Content-type: text/plain; charset=us-ascii Content-language: en Content-transfer-encoding: 7BIT Content-disposition: inline X-Accept-Language: en References: <87F42982BF2B434F831FCEF4C45FC33E4209B193@EXCHANGE.corporate.connx.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/21 X-Sequence-Number: 175283 Create domain is only useful for abstracting common constraints on fields into single location for maintenance. It may not be useful to link tables. ----- Original Message ----- From: Dann Corbit Date: Wednesday, December 1, 2010 4:04 pm Subject: RE: [HACKERS] Proposal: First step towards Intelligent,integrateddatabase To: "'ghatpande@vsnl.net'" , pgsql hackers > I am probably just being thick, but how is your idea different > from create domain: > http://www.postgresql.org/docs/current/static/sql-createdomain.html > > > From: pgsql-hackers-owner@postgresql.org [mailto:pgsql-hackers- > owner@postgresql.org] On Behalf Of ghatpande@vsnl.net > Sent: Wednesday, December 01, 2010 2:20 AM > To: pgsql hackers > Subject: [HACKERS] Proposal: First step towards > Intelligent,integrated database > Importance: High > > Hello, > > Here is the proposal: My 1st step towards Intelligent, Integrated > database. I am explaining the proposal with the use of example. > Example: We will have a master table say CustMast and a > transaction table say salesOrder table. > View of CustMast: > CustCode Number(5), > CustName Varchar(30), > CustAdrsLine1 Varchar, > CustAdrsLine2 varchar etc. > View of SalesOrder: > Sordno Number(8), > Sorddt date, > CustCode Number(5) - present way of defining. > Proposed way is: > CustCode Object CustMast. --- New data type to be introduced > called "O" Object and create table definition to be modified > whenever data type is 'O', it will accept object name (in this > case table name). Here I want to inform data definition that field > and its data type is already defined in master table and use the > same data type here and both tables are linked with this field. > We will be using same field name in both tables if not along with > table name field name is to be accepted in create table definition. > Advantages: > > 1. Now database knows that custcode in salesorder is a > foreign key, a table constraint can be created. It also knows that > index to be created on this field. > > 2. In present situation select statement for selecting > values from join of both tables will be > > Select sordno, sorddt, custcode, custname, custadrsline1 > > from salesorder, custmast > > where salesorder.custcode=custmast.custcode. > > 3. In proposed way we can write this statement as: > > Select sordno, sorddt, custcode, custname, custadrsline1 > > from salesorder (with proper changes in program which pickup > values from select statement. > > 4. Field can be from another table in same database or from > Excel sheet column. > > 5. Views need not be created as all tables are properly > linked with each other in an application. > > 6. This is only first step and many advantages can be a > result of brainstorm. > > 7. This will change RDBMS, Tools and ERP to next generation. > > > > For any clarifications pl contact. Pl give your feedback. > > > > Regards Many, > > Vijay Ghatpande. > > Cell: +91 9822456142. >