Databases with Ruby

Hi
Which mysql or postgres gems should be used (mysq-*, mysql2*, ruby-mysql)
to interface to the (default) Linux-packages?
No gems found for postgres???

Is it advisable to use dbi still nowadays? (Does Rails use dbi???)
- there is an extra gem rails-dbi

What do most/advanced Rubyists use?

What is easier (also to maintain) - for beginners, but suitable for a
throughput of 10 items (rows) per second?
Better to bypass dbi in those case?

Thank you!!
Berg

Which mysql or postgres gems should be used (mysq-*, mysql2*,
ruby-mysql) to interface to the (default) Linux-packages?

I heard really good things about the "sequel" gem.
It can handle MySQL, PostgreSQL, SQLite, and many other databases.

What is easier (also to maintain) - for beginners, but suitable for a
throughput of 10 items (rows) per second?

I would guess practically anything would work for such a low throughput.

Regards,
Marcus

···

Am 10.08.2016 um 15:11 schrieb A Berger:

--
GitHub: stomar (Marcus Stollsteimer) · GitHub
PGP: 0x6B3A101A

Hello!

···

On Wed, Aug 10, 2016 at 4:11 PM, A Berger <aberger7890@gmail.com> wrote:

No gems found for postgres???

The Postgre gem is 'pg'.

--
Sincerely yours,

Aurel Branzeanu,

mailto: branzeanu.aurel@gmail.com
Skype: tvorogov
GSM Orange: +373 6 940-7700
GSM Moldcell: +373 7 940-7700

Is it advisable to use dbi still nowadays? (Does Rails use dbi???)
- there is an extra gem rails-dbi

dbi seems to have been a Perl thing (?)

When I understand correctly it provides an extra layer to unify
the access to different types of databases (via different
plug-ins or adapters), and also some functionality of an
object-relational mapper (aka ORM).

You find that approach in various gems:
Sequel, active_record, DataMapper, ROM (Ruby Object Mapper), ...

(Does Rails use dbi???)
- there is an extra gem rails-dbi

Rails uses active_record by default.

rails-dbi seems to be unmaintained for several years,
and was targeted for Rails 3 -- we now have Rails 5.

Regards,
Marcus

···

Am 10.08.2016 um 15:11 schrieb A Berger:

--
GitHub: stomar (Marcus Stollsteimer) · GitHub
PGP: 0x6B3A101A

Sequel is an ORM, so it's a rather different thing. It still requires a database access gem like pg.

It *is* good, if you want an ORM (although, personally, I don't get on with the Model framework).

···

-----Original Message-----
From: ruby-talk [mailto:ruby-talk-bounces@ruby-lang.org] On Behalf Of
sto.mar@web.de
Sent: 10 August 2016 2:36 pm
To: Ruby users
Subject: Re: Databases with Ruby

Am 10.08.2016 um 15:11 schrieb A Berger:
> Which mysql or postgres gems should be used (mysq-*, mysql2*,
> ruby-mysql) to interface to the (default) Linux-packages?

I heard really good things about the "sequel" gem.
It can handle MySQL, PostgreSQL, SQLite, and many other databases.

> What is easier (also to maintain) - for beginners, but suitable for a
> throughput of 10 items (rows) per second?

I would guess practically anything would work for such a low throughput.

Regards,
Marcus

--
GitHub: stomar (Marcus Stollsteimer) · GitHub
PGP: 0x6B3A101A

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer&gt;

Granted. Depends on what the OP exactly wants to do.

Personally, I like the extra bit of abstraction.
And of course, you are not forced to use Sequel::Model
and can also any time run raw SQL queries, too,
if you prefer.

Regards,
Marcus

···

Am 11.08.2016 um 09:45 schrieb Andy Jones:

Sequel is an ORM, so it's a rather different thing. It still requires a database access gem like pg.

It *is* good, if you want an ORM (although, personally, I don't get on with the Model framework).

--
GitHub: https://github.com/stomar/
PGP: 0x6B3A101A