[MonetDB-users] MonetDB-MAL usage questions

Hi, I am having some problems using mal. firstly, I want to find bats of a table 'st' I loaded. I created a table 'st' using sql.
./mclient -lsql -ddemo \
it creates table 'st' with two columns 'id' and 'name' \q
then, I try to use mal.
./mclient -lmal -ddemo bbp.open(); bbp.prelude(); a := bbp.bind("st", "id");
then, I got following error msg
ERROR = !MALException:bbp.find:BAT not found
I thought when a table is created using sql, it stored as number of bats and I can find it through bat buffer pool. but it seems that there is nothing in the bbp ( I tried bbp.getObjects(), and printed returns which contains no bats). Where can I get bats of table 'st'? What can be the logical name of each bat? (same as column name?? or tablename_columnname??) Second question) Although I've read all documents in MonetDB site, I'm still quite confused the way to use mal. For example, if I want to create table using mal, how could it be done? sql statement: "create table st ("id" integer not null, "name" varchar(30));" To understand mal, I think I need number of examples. Is there any documents I can study about mal? Is there any way to see system generated mal when I run sql statement? If I can, it can be good example code for me. I really hope that any one could help me. Thanks.

Dear Maria,
you will not find enough documentation around MAL except the code and
usage examples themselves. In sql
if you run:
sql>explain select * from st;
you will see the MAL code. Of course this code is wrapped with extra
code around necessary for correct accessing the sql catalog or for
optimization reasons.
lefteris
On Sun, Mar 8, 2009 at 7:11 AM, Maria
Hi, I am having some problems using mal. firstly, I want to find bats of a table 'st' I loaded.
I created a table 'st' using sql.
./mclient -lsql -ddemo \
it creates table 'st' with two columns 'id' and 'name' \q then, I try to use mal.
./mclient -lmal -ddemo bbp.open(); bbp.prelude(); a := bbp.bind("st", "id");
then, I got following error msg
ERROR = !MALException:bbp.find:BAT not found
I thought when a table is created using sql, it stored as number of bats and I can find it through bat buffer pool. but it seems that there is nothing in the bbp ( I tried bbp.getObjects(), and printed returns which contains no bats). Where can I get bats of table 'st'? What can be the logical name of each bat? (same as column name?? or tablename_columnname??)
Second question) Although I've read all documents in MonetDB site, I'm still quite confused the way to use mal. For example, if I want to create table using mal, how could it be done? sql statement: "create table st ("id" integer not null, "name" varchar(30));"
To understand mal, I think I need number of examples. Is there any documents I can study about mal? Is there any way to see system generated mal when I run sql statement? If I can, it can be good example code for me.
I really hope that any one could help me. Thanks.
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users

Hi, I am having some problems using mal. firstly, I want to find bats of a table 'st' I loaded.
I created a table 'st' using sql.
./mclient -lsql -ddemo \
it creates table 'st' with two columns 'id' and 'name' \q then, I try to use mal.
./mclient -lmal -ddemo bbp.open(); bbp.prelude(); a := bbp.bind("st", "id");
then, I got following error msg
ERROR = !MALException:bbp.find:BAT not found Indeed. The mapping from SQL tables to the underlying BATs is managed by the SQL catalog. You would have to inspect
Maria wrote: that one to gain access. Furthermore, manipulation of those BATs is discouraged, because it may affect the semantics assumed in the SQL frontends.
I thought when a table is created using sql, it stored as number of bats and I can find it through bat buffer pool. but it seems that there is nothing in the bbp ( I tried bbp.getObjects(), and printed returns which contains no bats). Where can I get bats of table 'st'? What can be the logical name of each bat? (same as column name?? or tablename_columnname??)
Second question) Although I've read all documents in MonetDB site, I'm still quite confused the way to use mal. For example, if I want to create table using mal, how could it be done? sql statement: "create table st ("id" integer not null, "name" varchar(30));"
MAL is a binary storage engine, not a n-ary relational system. The complete SQL frontend is the example how to perform such mappings. The key ingredient is to create multiple aligned BATs to represent the columns. Our paper "flattening an object-oriented world" gives (some) information.
To understand mal, I think I need number of examples. Is there any documents I can study about mal? Is there any way to see system generated mal when I run sql statement?
See the debugging options of the SQL frontend, e.g. use explain select.....
If I can, it can be good example code for me.
I really hope that any one could help me. Thanks.
------------------------------------------------------------------------
------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H
------------------------------------------------------------------------
_______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
participants (3)
-
Lefteris
-
Maria
-
Martin Kersten