Usage of RDBMS in Gemstone

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Usage of RDBMS in Gemstone

Bart Veenstra
Hi list,

I have a MySQL postcode database from the Netherlands which I want to
use in gemstone. No need to convert the whole database it to objects,
I just want to execute some SQL and parse the results into objects.
Each month, i get a new sql dump of all postcodes, so it is easier to
load it into mysql directly.

How about connecting to a RDBMS? Can I use squeakdbx without any
problems in gemstone?

Regards,

Bart
Reply | Threaded
Open this post in threaded view
|

Re: Usage of RDBMS in Gemstone

EstebanLM
no, you can't... SqueakDBX uses FFI, which is not yet supported by Gemstone. Next version will support it, and we will port then SqueakDBX, but for now... I don't know what you can do :(

El 09/10/2010, a las 9:03a.m., Bart Veenstra escribió:

> Hi list,
>
> I have a MySQL postcode database from the Netherlands which I want to
> use in gemstone. No need to convert the whole database it to objects,
> I just want to execute some SQL and parse the results into objects.
> Each month, i get a new sql dump of all postcodes, so it is easier to
> load it into mysql directly.
>
> How about connecting to a RDBMS? Can I use squeakdbx without any
> problems in gemstone?
>
> Regards,
>
> Bart

Reply | Threaded
Open this post in threaded view
|

Re: Usage of RDBMS in Gemstone

Mariano Martinez Peck
In reply to this post by Bart Veenstra


On Sat, Oct 9, 2010 at 2:03 PM, Bart Veenstra <[hidden email]> wrote:
Hi list,

I have a MySQL postcode database from the Netherlands which I want to
use in gemstone. No need to convert the whole database it to objects,

Hi Bart. Some people in the past used SqueakDBX exactly for this: for migrating data from a RDBMS to Gemstone/Magma. Seems it is not your case, tought.
 
I just want to execute some SQL and parse the results into objects.
Each month, i get a new sql dump of all postcodes, so it is easier to
load it into mysql directly.

How about connecting to a RDBMS? Can I use squeakdbx without any
problems in gemstone?


I would say not in "old" gemstone. The problem is that SqueakDBX uses FFI to talk to the OpenDBX shared library. However, at ESUG I saw a Gemstone presentation and seems that for 3.0 they were going to have FFI. In that case, then yes, I think SqueakDBX could be easily ported to Gemstone.

On the other hand, particularly for MySQL (since it is open-source) there is a Squeak driver, which talks directly to the server (doesn't depend on FFI). Maybe it is easier porting that to Gemstone? 

Cheers

Mariano


 
Regards,

Bart

Reply | Threaded
Open this post in threaded view
|

Re: Usage of RDBMS in Gemstone

Bart Veenstra
I'll have a look at the native driver installation. SqueakDBX looks
like a bit overkill, because I only execute a couple of SQL statements
to get the address for a certain postcode. No transaction stuff or
updating. I could also setup a small php/json server to return the
postcodes, but that won't help the community...

2010/10/9 Mariano Martinez Peck <[hidden email]>:

>
>
> On Sat, Oct 9, 2010 at 2:03 PM, Bart Veenstra <[hidden email]>
> wrote:
>>
>> Hi list,
>>
>> I have a MySQL postcode database from the Netherlands which I want to
>> use in gemstone. No need to convert the whole database it to objects,
>
> Hi Bart. Some people in the past used SqueakDBX exactly for this: for
> migrating data from a RDBMS to Gemstone/Magma. Seems it is not your case,
> tought.
>
>>
>> I just want to execute some SQL and parse the results into objects.
>> Each month, i get a new sql dump of all postcodes, so it is easier to
>> load it into mysql directly.
>>
>> How about connecting to a RDBMS? Can I use squeakdbx without any
>> problems in gemstone?
>>
>
> I would say not in "old" gemstone. The problem is that SqueakDBX uses FFI to
> talk to the OpenDBX shared library. However, at ESUG I saw a Gemstone
> presentation and seems that for 3.0 they were going to have FFI. In that
> case, then yes, I think SqueakDBX could be easily ported to Gemstone.
>
> On the other hand, particularly for MySQL (since it is open-source) there is
> a Squeak driver, which talks directly to the server (doesn't depend on FFI).
> Maybe it is easier porting that to Gemstone?
>
> Cheers
>
> Mariano
>
>
>
>>
>> Regards,
>>
>> Bart
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Usage of RDBMS in Gemstone

Mariano Martinez Peck


On Sat, Oct 9, 2010 at 2:21 PM, Bart Veenstra <[hidden email]> wrote:
I'll have a look at the native driver installation. SqueakDBX looks
like a bit overkill, because I only execute a couple of SQL statements
to get the address for a certain postcode. No transaction stuff or
updating. I could also setup a small php/json server to return the
postcodes, but that won't help the community...

Even if I hate it, why not using WebServices? I guess it should be easy to create few webservices for the queries to need, and you consume them from gemstone (can you do that?)


 

2010/10/9 Mariano Martinez Peck <[hidden email]>:
>
>
> On Sat, Oct 9, 2010 at 2:03 PM, Bart Veenstra <[hidden email]>
> wrote:
>>
>> Hi list,
>>
>> I have a MySQL postcode database from the Netherlands which I want to
>> use in gemstone. No need to convert the whole database it to objects,
>
> Hi Bart. Some people in the past used SqueakDBX exactly for this: for
> migrating data from a RDBMS to Gemstone/Magma. Seems it is not your case,
> tought.
>
>>
>> I just want to execute some SQL and parse the results into objects.
>> Each month, i get a new sql dump of all postcodes, so it is easier to
>> load it into mysql directly.
>>
>> How about connecting to a RDBMS? Can I use squeakdbx without any
>> problems in gemstone?
>>
>
> I would say not in "old" gemstone. The problem is that SqueakDBX uses FFI to
> talk to the OpenDBX shared library. However, at ESUG I saw a Gemstone
> presentation and seems that for 3.0 they were going to have FFI. In that
> case, then yes, I think SqueakDBX could be easily ported to Gemstone.
>
> On the other hand, particularly for MySQL (since it is open-source) there is
> a Squeak driver, which talks directly to the server (doesn't depend on FFI).
> Maybe it is easier porting that to Gemstone?
>
> Cheers
>
> Mariano
>
>
>
>>
>> Regards,
>>
>> Bart
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Usage of RDBMS in Gemstone

Yanni Chiu
In reply to this post by Bart Veenstra
How big is the sql dump (i.e. how many rows)?
What key is used for lookup? Will you do lookups based on something
other than the key?

How about this approach.
- read the dump into MySQL
- export it from MySQL in an easy to parse format (I assume MySQL can
export in CSV)
- read and parse the file into a GemStone dictionary using whatever key
you want, and saving the whole CSV line as the dictionary value
- do your key lookups, and parse the CSV string as necessary (which
should be simpler to deal with than SQL results)

--
Yanni


On 09/10/10 8:03 AM, Bart Veenstra wrote:

> Hi list,
>
> I have a MySQL postcode database from the Netherlands which I want to
> use in gemstone. No need to convert the whole database it to objects,
> I just want to execute some SQL and parse the results into objects.
> Each month, i get a new sql dump of all postcodes, so it is easier to
> load it into mysql directly.
>
> How about connecting to a RDBMS? Can I use squeakdbx without any
> problems in gemstone?
>
> Regards,
>
> Bart
>
Reply | Threaded
Open this post in threaded view
|

Re: Usage of RDBMS in Gemstone

Bart Veenstra
The postcode database is about 670.000 rows but the dataprovider also
delivers CSV files. I'll have a closer look at those CSV files.

Otherwise, I think I will create a simple webservice for the data :)

Regards,

Bart

2010/10/9 Yanni Chiu <[hidden email]>:

> How big is the sql dump (i.e. how many rows)?
> What key is used for lookup? Will you do lookups based on something other
> than the key?
>
> How about this approach.
> - read the dump into MySQL
> - export it from MySQL in an easy to parse format (I assume MySQL can export
> in CSV)
> - read and parse the file into a GemStone dictionary using whatever key you
> want, and saving the whole CSV line as the dictionary value
> - do your key lookups, and parse the CSV string as necessary (which should
> be simpler to deal with than SQL results)
>
> --
> Yanni
>
>
> On 09/10/10 8:03 AM, Bart Veenstra wrote:
>>
>> Hi list,
>>
>> I have a MySQL postcode database from the Netherlands which I want to
>> use in gemstone. No need to convert the whole database it to objects,
>> I just want to execute some SQL and parse the results into objects.
>> Each month, i get a new sql dump of all postcodes, so it is easier to
>> load it into mysql directly.
>>
>> How about connecting to a RDBMS? Can I use squeakdbx without any
>> problems in gemstone?
>>
>> Regards,
>>
>> Bart
>>
>