[Monetdb-developers] MAL access to tables created with SQL

Martin Kersten Martin.Kersten at cwi.nl
Sat Oct 13 16:31:58 CEST 2007


The discussion thread indicates a need for some advice.
The software stack has been designed to ease a layered approach
whereby the MAL layer acts as an abstract engine.  In any
such layering scheme, it is from a software architecture
point of view highly discouraged to jump in the middle.

Either, your solution works on top of SQL or it
works directly on MAL. Don't ever attempt to be a
man in the middle, e.g. exploiting the implementation
scheme deployed for the SQL stack.
It is much more complicated and extremely fragile.

Instead, use the inspiration of SQL->MAL to develop your own
solution, including the necessary catalog management
structures. Or just extend SQL with a few missing functions
to do the specifics.

regards, Martin

darabi at web.de wrote:
> Martin.Kersten at cwi.nl wrote:
>
>   
>> darabi at web.de wrote:
>>     
>>> Hello,
>>>
>>> how is it possible to access in a MAL client session (mclient -l mal)
>>> the BATs of tables which were created previously in sql?
>>>   
>>>       
>> You can't, because the mapping of SQL to BATs is maintained in the SQL 
>> private catalog.
>> Also, each column in SQL has multiple bats.
>>     
>
> Is it not recommended or not at all possible?
>
> Because what I am up to could be implemented on top of sql
> (at least to rapidly get off the ground in the beginning).
>
> I would like to have something like this for an OODB schema:
>
> - one bat for each class
> - one bat for each attribute (maybe also a persistent reversed bat
> sorted on the value to be able to speed up equality and range queries)
> - one bat for each relation between classes
> - one bat for each collection which contains attributes (and not references)
>
> And if I interpret the contents of sql_catalog correctly,
> much of it is already present there.
>
> If it is technically impossible, then I would have to
> duplicate some of that.
>
>
> Kambiz
>
>   





More information about the developers-list mailing list