Re: users-list Digest, Vol 13, Issue 16
Thanks a lot for replying :)
But its really unclear to me as to how can I load RDF data into monetdb. As
I have a 1000 property values and I can not manually create table for each
of the property values. TSQL allows something like SELECT * INTO someTable
FROM sourceTable.
RDF query engines like RDF3X, BitMat (Medha Atre, et.al.) have all employed
monetdb. So, if there is some way out can you please help me with it.
On Sat, Sep 21, 2013 at 12:00 PM,
Send users-list mailing list submissions to users-list@monetdb.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.monetdb.org/mailman/listinfo/users-list or, via email, send a message with subject or body 'help' to users-list-request@monetdb.org
You can reach the person managing the list at users-list-owner@monetdb.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of users-list digest..."
Today's Topics:
1. Re: How to automate creation of property tables in monetdb? (Rose Beck) 2. Re: How to automate creation of property tables in monetdb? (Martin Kersten)
----------------------------------------------------------------------
Message: 1 Date: Sat, 21 Sep 2013 11:49:10 +0530 From: Rose Beck
To: users-list@monetdb.org Subject: Re: How to automate creation of property tables in monetdb? Message-ID: Content-Type: text/plain; charset="iso-8859-1" A gentle reminder. Can someone please help me with this?
On Fri, Sep 20, 2013 at 7:58 PM, Rose Beck
wrote: I am trying to load data (from myfile, the format of myfile is explained below) into monetdb using itsSQL interface. mytable format:
1 2 3 5 7 8 8 2 3.....
The commands which I am using for performing the same are given below:
sql> create table mytable(subject integer, property integer, object integer);
sql> copy 10000000 records into mytable from myfile delimiter ' ','\n';
For each property value (i.e. middle column) I create a separate table:
create table prop1(subject integer, object integer); create table prop2(subject integer, object integer); create table prop3(subject integer, object integer); ...
and then fill these tables using the following commands:
INSERT into prop1 SELECT subject, object FROM triples_table where property=prop1 ORDER BY subject, object;
Is there some way to automate this process. i.e. right now I am manually creating a separate table for all the distinct properties (using create table prop1(subject integer, object integer); ) and then filling this table using insert command (INSERT into prop1 SELECT subject, object FROM triples_table where property=prop1 ORDER BY subject, object; ). Is there some way by which I may automate this procedure.
One of the methods which I know of is to create a C++/python program and then call all functions like "create table" by using shell script. But is there a faster method to achieve the same.
Also can you please guide as to how can I create and integrate dictionary (RDF: id to string mapping) to sql queries?
Also is there some efficient way by which I may call monetdb from within a
programming language like python. I intend to use programming language, in
order to iterate over the distinct property values. Is there some way
out..please help.
On Sat, Sep 21, 2013 at 12:07 PM, Rose Beck
Thanks a lot for replying :) But its really unclear to me as to how can I load RDF data into monetdb. As I have a 1000 property values and I can not manually create table for each of the property values. TSQL allows something like SELECT * INTO someTable FROM sourceTable.
RDF query engines like RDF3X, BitMat (Medha Atre, et.al.) have all employed monetdb. So, if there is some way out can you please help me with it.
On Sat, Sep 21, 2013 at 12:00 PM,
wrote: Send users-list mailing list submissions to users-list@monetdb.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.monetdb.org/mailman/listinfo/users-list or, via email, send a message with subject or body 'help' to users-list-request@monetdb.org
You can reach the person managing the list at users-list-owner@monetdb.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of users-list digest..."
Today's Topics:
1. Re: How to automate creation of property tables in monetdb? (Rose Beck) 2. Re: How to automate creation of property tables in monetdb? (Martin Kersten)
----------------------------------------------------------------------
Message: 1 Date: Sat, 21 Sep 2013 11:49:10 +0530 From: Rose Beck
To: users-list@monetdb.org Subject: Re: How to automate creation of property tables in monetdb? Message-ID: Content-Type: text/plain; charset="iso-8859-1" A gentle reminder. Can someone please help me with this?
On Fri, Sep 20, 2013 at 7:58 PM, Rose Beck
wrote: I am trying to load data (from myfile, the format of myfile is explained below) into monetdb using itsSQL interface. mytable format:
1 2 3 5 7 8 8 2 3.....
The commands which I am using for performing the same are given below:
sql> create table mytable(subject integer, property integer, object integer);
sql> copy 10000000 records into mytable from myfile delimiter ' ','\n';
For each property value (i.e. middle column) I create a separate table:
create table prop1(subject integer, object integer); create table prop2(subject integer, object integer); create table prop3(subject integer, object integer); ...
and then fill these tables using the following commands:
INSERT into prop1 SELECT subject, object FROM triples_table where property=prop1 ORDER BY subject, object;
Is there some way to automate this process. i.e. right now I am manually creating a separate table for all the distinct properties (using create table prop1(subject integer, object integer); ) and then filling this table using insert command (INSERT into prop1 SELECT subject, object FROM triples_table where property=prop1 ORDER BY subject, object; ). Is there some way by which I may automate this procedure.
One of the methods which I know of is to create a C++/python program and then call all functions like "create table" by using shell script. But is there a faster method to achieve the same.
Also can you please guide as to how can I create and integrate dictionary (RDF: id to string mapping) to sql queries?
See http://www.monetdb.org/Documentation/Manuals/SQLreference/Programming/Python On 9/21/13 8:48 AM, Rose Beck wrote:
Also is there some efficient way by which I may call monetdb from within a programming language like python. I intend to use programming language, in order to iterate over the distinct property values. Is there some way out..please help.
On Sat, Sep 21, 2013 at 12:07 PM, Rose Beck
mailto:rosebeck.82@gmail.com> wrote: Thanks a lot for replying :) But its really unclear to me as to how can I load RDF data into monetdb. As I have a 1000 property values and I can not manually create table for each of the property values. TSQL allows something like SELECT * INTO someTable FROM sourceTable.
RDF query engines like RDF3X, BitMat (Medha Atre, et.al http://et.al.) have all employed monetdb. So, if there is some way out can you please help me with it.
On Sat, Sep 21, 2013 at 12:00 PM,
mailto:users-list-request@monetdb.org> wrote: Send users-list mailing list submissions to users-list@monetdb.org mailto:users-list@monetdb.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.monetdb.org/mailman/listinfo/users-list or, via email, send a message with subject or body 'help' to users-list-request@monetdb.org mailto:users-list-request@monetdb.org
You can reach the person managing the list at users-list-owner@monetdb.org mailto:users-list-owner@monetdb.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of users-list digest..."
Today's Topics:
1. Re: How to automate creation of property tables in monetdb? (Rose Beck) 2. Re: How to automate creation of property tables in monetdb? (Martin Kersten)
----------------------------------------------------------------------
Message: 1 Date: Sat, 21 Sep 2013 11:49:10 +0530 From: Rose Beck
mailto:rosebeck.82@gmail.com> To: users-list@monetdb.org mailto:users-list@monetdb.org Subject: Re: How to automate creation of property tables in monetdb? Message-ID: mailto:WZAAfDK3Cw@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1" A gentle reminder. Can someone please help me with this?
On Fri, Sep 20, 2013 at 7:58 PM, Rose Beck
mailto:rosebeck.82@gmail.com> wrote: > I am trying to load data (from myfile, the format of myfile is explained > below) into monetdb using itsSQL interface. mytable format: > > 1 2 3 > 5 7 8 > 8 2 3..... > > The commands which I am using for performing the same are given below: > > sql> create table mytable(subject integer, property integer, object integer); > > sql> copy 10000000 records into mytable from myfile delimiter ' ','\n'; > > For each property value (i.e. middle column) I create a separate table: > > create table prop1(subject integer, object integer); > create table prop2(subject integer, object integer); > create table prop3(subject integer, object integer); ... > > and then fill these tables using the following commands: > > INSERT into prop1 SELECT subject, object FROM triples_table where property=prop1 ORDER BY subject, object; > > Is there some way to automate this process. i.e. right now I am manually > creating a separate table for all the distinct properties (using create > table prop1(subject integer, object integer); ) and then filling this > table using insert command (INSERT into prop1 SELECT subject, object FROM > triples_table where property=prop1 ORDER BY subject, object; ). Is there > some way by which I may automate this procedure. > > One of the methods which I know of is to create a C++/python program and > then call all functions like "create table" by using shell script. But is > there a faster method to achieve the same. > > Also can you please guide as to how can I create and integrate dictionary > (RDF: id to string mapping) to sql queries? >
mailto:users-list@monetdb.org> >
participants (2)
-
Martin Kersten
-
Rose Beck