Re: relational tables and objects
Date: Wed, 30 Oct 2002 22:23:10 GMT
"Leandro Guimarăes Faria Corsetti Dutra" <lgcdutra_at_terra.com.br> wrote
> Do you provide support for mapping the data structures and the
> operations to relevant DSL, say SQL DDL & DML?
No. C++ is only language the library is designed for. It uses C++
calculations for schema manipulation, however DDL is quite rudimentary: we can specify types and names of columns, types of tuples, sort order for relations and
relations. It is also possible to specify if a relational table is fully sorted (i.e.
sort_list is a key). Currently we have no notion for functional dependencies.
C++ also is the sole DML language. We have few methods
the table class, and user can exploit STL algorithms (such as copy) to create new tables.
We think, that C++ is good enough for data manipulation.
> I would rather have a lightweight, D-compliant relational engine
> built-in into the OS or development framework. Say Dataphor Alphora
> Lite… you might consider making your language D-compliant, see The
> Third Manifesto at http://www.thethirdmanifesto.com/.
RTL is C++ template library. It is impossible to use it from any other
language, because it
is not a standalone engine, but part of compiled C++ program. The question is if C++ with RTL is
>D supports type generators for tuple types
>and relation types, along with prescribed
>operators on tuples and relations.
Yes, it is exactly what RTL does in C++ compile-time.
>D (unlike SQL) supports a truth-valued type
>consisting of the values true and false, and
>is firmly based in two-valued logic.
Yes. RTL uses C++ bool, which is two-valued logic.
>SQL's mistakes are not made in D (so, e.g.,
>no nulls, no duplicate rows, no anonymous
>columns, column names unique within
>table, "=" means equals and tables with no
>columns are recognised)
We do not have "native" nulls. If a user needs notion null for some type of
column he or she
should provide class (and operations) which have such value.
Currently we can get duplicate rows, like in SQL they can be suppressed
using "distinct" function.
Probably it has sense to enforce call to the function.
RTL table can not have anonymous columns or duplicated column names.
tables with no columns are OK.
We do not use equality, but equivalence, based on less predicate. Two values a and b are equivalent, if neither a<b, nor b<a.
> Do you *really* mean _relational table_ or rather the more common _SQL
> Do you mean a relation or a relvar?
No. We can not do it currently. The technique we use (C++ meta-programming)
allows to do that,
but we are not sure, if it is required in real life.
dmitriy_arapov_at_hotmail.com Received on Wed Oct 30 2002 - 23:23:10 CET