Re: Can these constraint be implemented in an RDBMS ?
Date: Tue, 2 Mar 2004 14:10:21 +0100
Message-ID: <404487bd$0$3678$4d4ebb8e_at_read.news.nl.uu.net>
Thanks for your time and solution,
And allthough this newsgroup has the name 'theory' in it, I still tend to think in practical terms. (Existing RDBMSsen). Offcourse this is my fault, sorry for that.
But thanks for the solution, it gives some new insights for me.
ben brugman
"Alfredo Novoa" <alfredo_at_ncs.es> wrote in message
news:4044793f.9804438_at_news.wanadoo.es...
> On Tue, 2 Mar 2004 11:15:40 +0100, "ben brugman" <ben_at_niethier.nl>
> wrote:
>
> >> There is a clear contradiction. Oracle and SQL-Server are not RDBMSs.
> >
> >Can you clearify this a bit more ?
>
> Oracle and SQL Server are not truly Relational Database Management
> Systems, they violate The Relational Model in many ways.
>
> >
> >Can you name RDBMSs ?
>
> No. I can't. They don't exist.
>
> >Do you have a solution for the problem if this requirement (Oracle or
> >SQL-server)
> >is dropped.
>
> It does not seem very difficult.
>
> Here is a solution in Tutorial D I typed in a hurry and I have not
> checked, so I supose it is flawed O:-)
>
> var Customers relation { Customer Char } key { Customer };
>
> var Accounts relation { Account Char, Customer Char, Amount Numeric }
> key { Account };
>
> var Sets relation { Set Char } key { Set };
>
> var SetMinimums { Set Char, MinimunAmount Numeric }
> key { Set }
> foreign key { Set } references Set;
>
> var SetAccounts { Set Char, Account Char }
> key { Set, Account }
> foreign key { Set } references Sets;
>
> var IndividualAccounts view
> Accounts { Account } minus SetAccounts { Account };
>
> var SetAccountsAmount view
> summarize SetAccounts join Accounts per SetAccounts { Set } add
> Sum(Amount) as Amount;
>
> create constraint MaxAmount
> IsEmpty(Accounts where Amount > 100000000);
>
> create constraint IndividualAccountsNotNegative
> IsEmpty((Accounts join IndividualAccounts) where Amount < 0);
>
> create constraint SetAccountsNotNegative
> IsEmpty(SetAccountsAmount where Amount < 0);
>
> create constraint MinimumAmount
> IsEmpty(SetAccountsAmount join SetMinimums where Amount <
> MinimumAmount);
>
> > The imaginairy customer still likes to make a choice between at
> >least two 'RDBMSs'.
>
> Then he would have to build at least two RDBMSs by himself :)
>
>
> Regards
> Alfredo
Received on Tue Mar 02 2004 - 14:10:21 CET