# Correct way to transparently use SQLite.jl responses or (legacy) text files as a data source

**URL:** https://discourse.julialang.org/t/correct-way-to-transparently-use-sqlite-jl-responses-or-legacy-text-files-as-a-data-source/41825
**Category:** General Usage
**Tags:** dataframes, sqlite
**Created:** [June 21, 2020, 8:37pm UTC](https://discourse.julialang.org/t/correct-way-to-transparently-use-sqlite-jl-responses-or-legacy-text-files-as-a-data-source/41825 "2020-06-21T20:37:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mkarikom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkarikom/32/7096_2.png) [@mkarikom](https://discourse.julialang.org/u/mkarikom)
#### Post date: [June 21, 2020, 8:37pm UTC](https://discourse.julialang.org/t/correct-way-to-transparently-use-sqlite-jl-responses-or-legacy-text-files-as-a-data-source/41825/1 "2020-06-21T20:37:12Z")

</div>

I’ve really been enjoying SQLight.jl as a back end that just works. Is there any high level documentation on the relationship between SQLight.jl, Tables.jl, and DataFrames.jl?

Background: Unfortunately, the package I’m currently working on needs to also support text files as a data source for some users (in my area of scientific computing, databases are not widely used or understood), so DataFrames seems like the best representation since it can be populated by an SQLite response or a text file. However, I’m getting confused about the difference between Tables.jl and DataFrames.jl, since they seem to be very similar.

---

<div class="post-metadata">

### Author: ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)
#### Post date: [June 22, 2020, 3:33am UTC](https://discourse.julialang.org/t/correct-way-to-transparently-use-sqlite-jl-responses-or-legacy-text-files-as-a-data-source/41825/2 "2020-06-22T03:33:38Z")

</div>

Tables.jl is an interface library, it defines generic functions, any type that implements those functions can be treated like a table source. This is true of DataFrames, but it’s also true of functions in the CSV library, the SQLite library, etc etc. It’s basically just ways to access data inside whatever types you are storing them.

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [June 22, 2020, 5:40am UTC](https://discourse.julialang.org/t/correct-way-to-transparently-use-sqlite-jl-responses-or-legacy-text-files-as-a-data-source/41825/3 "2020-06-22T05:40:13Z")

</div>

In addition to @dlakelan’s excellent answer, you may find the following post informative about motivation for Tables.jl:

> [@Tables.jl: a table interface for everyone](https://discourse.julialang.org/t/tables-jl-a-table-interface-for-everyone/14071):
>
> I’ve had several people direct message me over the last couple of days asking for details about a new package I’ve been working: [Tables.jl](https://github.com/JuliaData/Tables.jl), so I thought I’d write up a quick post on what it is, where it came from, and where it’s going. There’s been talk for several years now of having an “AbstractTables.jl” package that would define the definitive common table interface for julia. Most efforts have died out pretty quickly or lost traction and were abandoned (I count at least 5 of these efforts …

---

<div class="post-metadata">

### Author: ![mkarikom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkarikom/32/7096_2.png) [@mkarikom](https://discourse.julialang.org/u/mkarikom)
#### Post date: [June 24, 2020, 5:51pm UTC](https://discourse.julialang.org/t/correct-way-to-transparently-use-sqlite-jl-responses-or-legacy-text-files-as-a-data-source/41825/5 "2020-06-24T17:51:02Z")

</div>

Thanks, @dlakelan for the summary and @Tamas_Papp for the documentation. That provides all the info I need.
