emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Tables to DB
@ 2009-12-03 14:11 andrea
  2009-12-03 15:43 ` [babel] " Eric Schulte
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: andrea @ 2009-12-03 14:11 UTC (permalink / raw)
  To: emacs-orgmode


Org tables are great but for visualization and querying maybe databases
are better, for example sqlite for small amounts of data is very nice
and powerful.

I found this
http://orgmode.org/worg/org-tutorials/multitarget-tables.php which I
haven't tried yet but looks nice.

I would like to have an automatic way to automatically fill some
database tables from orgmode tables, done maybe automatically when the
file is saved.
So the hook should:
- check for tables with #+ORGTBL line above
- store the data on the right sqlite table

Rewrite completely the table every time is not a big problem since the
amount of data is really not big.

Given that I will be able to do nice things with python-sqlite and also
finally replace this
http://alexandria.rubyforge.org/
for book management

Anyone is already doing something like that?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [babel] Tables to DB
  2009-12-03 14:11 Tables to DB andrea
@ 2009-12-03 15:43 ` Eric Schulte
  2009-12-04 10:40   ` andrea
  2009-12-04 18:12 ` Dan Davison
  2009-12-04 20:01 ` Sebastian Rose
  2 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2009-12-03 15:43 UTC (permalink / raw)
  To: andrea; +Cc: emacs-orgmode

Org-babel has support for SQL, so I presume that you could use that as a
somewhat manual way to dump org-mode tables into sql tables.

Also, if you have a python tool which you are using for interaction with
sql tables, it may be easiest to use org-babel to convert your org-mode
tables into python arrays, then let python handle the rest of the
integration.

Best -- Eric

andrea <andrea.crotti.0@gmail.com> writes:

> Org tables are great but for visualization and querying maybe databases
> are better, for example sqlite for small amounts of data is very nice
> and powerful.
>
> I found this
> http://orgmode.org/worg/org-tutorials/multitarget-tables.php which I
> haven't tried yet but looks nice.
>
> I would like to have an automatic way to automatically fill some
> database tables from orgmode tables, done maybe automatically when the
> file is saved.
> So the hook should:
> - check for tables with #+ORGTBL line above
> - store the data on the right sqlite table
>
> Rewrite completely the table every time is not a big problem since the
> amount of data is really not big.
>
> Given that I will be able to do nice things with python-sqlite and also
> finally replace this
> http://alexandria.rubyforge.org/
> for book management
>
> Anyone is already doing something like that?
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [babel] Tables to DB
  2009-12-03 15:43 ` [babel] " Eric Schulte
@ 2009-12-04 10:40   ` andrea
  0 siblings, 0 replies; 5+ messages in thread
From: andrea @ 2009-12-04 10:40 UTC (permalink / raw)
  To: emacs-orgmode

"Eric Schulte" <schulte.eric@gmail.com> writes:

> Org-babel has support for SQL, so I presume that you could use that as a
> somewhat manual way to dump org-mode tables into sql tables.
>
> Also, if you have a python tool which you are using for interaction with
> sql tables, it may be easiest to use org-babel to convert your org-mode
> tables into python arrays, then let python handle the rest of the
> integration.
>
> Best -- Eric
>

Good thanks I'll try it out something and see how it works..
Sorry for the double posting by the way, gnus is still non deterministic
for me (configuration problem I guess), I always see different messages!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tables to DB
  2009-12-03 14:11 Tables to DB andrea
  2009-12-03 15:43 ` [babel] " Eric Schulte
@ 2009-12-04 18:12 ` Dan Davison
  2009-12-04 20:01 ` Sebastian Rose
  2 siblings, 0 replies; 5+ messages in thread
From: Dan Davison @ 2009-12-04 18:12 UTC (permalink / raw)
  To: andrea; +Cc: emacs-orgmode

andrea <andrea.crotti.0@gmail.com> writes:

> Org tables are great but for visualization and querying maybe databases
> are better, for example sqlite for small amounts of data is very nice
> and powerful.
>
> I found this
> http://orgmode.org/worg/org-tutorials/multitarget-tables.php which I

When I read interesting and impressive stuff like that on Worg I always
wonder who the author is! Of course we can look at the org files (ans:
Jason Riedy) but what do people think about displaying the authors in
the HTML version of Worg? Unless it is a deliberate decision not to, I
tend to think it would be helpful.

Dan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tables to DB
  2009-12-03 14:11 Tables to DB andrea
  2009-12-03 15:43 ` [babel] " Eric Schulte
  2009-12-04 18:12 ` Dan Davison
@ 2009-12-04 20:01 ` Sebastian Rose
  2 siblings, 0 replies; 5+ messages in thread
From: Sebastian Rose @ 2009-12-04 20:01 UTC (permalink / raw)
  To: andrea; +Cc: emacs-orgmode

andrea <andrea.crotti.0@gmail.com> writes:
> Org tables are great but for visualization and querying maybe databases
> are better, for example sqlite for small amounts of data is very nice
> and powerful.
>
> I found this
> http://orgmode.org/worg/org-tutorials/multitarget-tables.php which I
> haven't tried yet but looks nice.
>
> I would like to have an automatic way to automatically fill some
> database tables from orgmode tables, done maybe automatically when the
> file is saved.
> So the hook should:
> - check for tables with #+ORGTBL line above
> - store the data on the right sqlite table
>
> Rewrite completely the table every time is not a big problem since the
> amount of data is really not big.
>
> Given that I will be able to do nice things with python-sqlite and also
> finally replace this
> http://alexandria.rubyforge.org/
> for book management
>
> Anyone is already doing something like that?
>

In SQL-mode, one can turn on the `electric semilcolon' to send queries
to a database.

Since this is part of emacs, why not try to use it? Maybe this could be
used from Org-mode, too?


  Sebastian

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-04 20:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-03 14:11 Tables to DB andrea
2009-12-03 15:43 ` [babel] " Eric Schulte
2009-12-04 10:40   ` andrea
2009-12-04 18:12 ` Dan Davison
2009-12-04 20:01 ` Sebastian Rose

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).