DB dump into LaTeX with Python and R?

I have quite a large index. I am planning to create a full-blown DB for it and later export the information to LaTeX. I am comfortable with R and Python so I would like to work with them but I feel there must be something already built. I mean to save info INDEX_KEY|CATEGORY|TITLE|DESCRIPTION|TIME in DB, rather than type that into latex directly - I feel DB could help with searching and indexing later. Do some DBs already have Latex converting possibility?

Related

1. Postgress, Python and LaTeX -question (unsolved)
2. Automating Adding Tables Fast to LateX from R? (maybe relevant)
3. Python and LaTeX (not yet tried, not sure whether relevant) outlining
-
IMHO you could use Python to read data from your DB and generate mydata.tex file with the entries already formated the way you want, e.g., using longtable, etc. Then in a main tex file, you just use \input{mydata}. –  Paulo Cereda Nov 22 '11 at 23:14
I thik datatool package is exactly whant you need. From the package documentation:
@hhh Probably to get from the DB a suitably formatted file. TeX is able to read an entire file (\input) or to scan it line by line. datatool loads the file in the second way and transforms each line in a suitable way all inside LaTeX, which is memory consuming. Conversely, if the file is already conveniently formatted, it can be \input. –  egreg Nov 23 '11 at 23:15