JuliaDatabases / Roadmap.jl

Overview of projects to build database support for Julia
MIT License
1 stars 2 forks source link

DBAPI or DBI or something else? #2

Open ViralBShah opened 8 years ago

ViralBShah commented 8 years ago

1 discusses DBI. I thought it is best to open a new issue. DBAPI.jl is looking quite good, and there seems to be general agreement on following the lead of python. We now have a fair number of database drivers in JuliaDB, and it seems that with a little bit of effort, we can take our database support to the next level.

iamed2 commented 8 years ago

Thanks :)

I'm currently working on a PostgreSQL.jl complete revamp and migration to the DBAPI.jl interface. I planned on pushing for DBAPI.jl once that was in place. I'm still making some small changes to DBAPI.jl as I develop PostgreSQL.jl.

ViralBShah commented 8 years ago

I believe @nkottary is working on a couple other migrations to DBAPI.jl, which is why I figured this discussion is best started.

iamed2 commented 8 years ago

Exciting! :) I did not know.

datnamer commented 8 years ago

Any thoughts on a dataframe/table front end to replace the current dataframe?

Or would this be another level of abstraction higher than DBAPI?

iamed2 commented 8 years ago

@datnamer I would think it would be higher. With the fetchinto methods in DBAPI.jl it's easy to get results in a DataFrame or Table structure. I'm planning to make DBAPI available as a DataSource in @quinnj's new framework so his work on table-like structures should be usable with DBAPI.

datnamer commented 8 years ago

Cool. Would this be a view into the original database or something like another Julia native data structure like an array?

iamed2 commented 8 years ago

Both are definitely possible. The latter is essentially implemented. We have some experimental work going on at invenia/DataViews.jl for the former (essentially a view+cache) but it is definitely experimental at this point.

TheOnlySilverClaw commented 7 years ago

Erm...I'm currently trying to understand how to use databases with Julia and I'm a bit confused. Looking at the more active projects, there are at least two APIs (DBI und DBAPI). SQLite.jl and MySQL.jl do not mention whether they implements any of those, PostgreSQL.jl seems to implement DBI, but is in 'maintenance mode' and ODBC.jl is a completely different standard and I guess not yet compatible with DBI or DBAPI. So, what are people actually using nowadays and is there any progress regarding a common API?

iamed2 commented 7 years ago

As far as I know, no one is working on a common database interface. ODBC is probably your best best as it supports a bunch of databases and fits into the DataStreams framework.

quinnj commented 7 years ago

Here's my understanding (as the author of the SQLite.jl and ODBC.jl packages):

I think it'd be great to come up with an actual DBAPI that packages could code against, but there hasn't been a lot of effort here for a while. It's on my radar, but I have other pressing interests for the moment (i.e. webstack).