[Tutor] make a sqlite3 database from an ordinary text file

Mats Wichmann mats at wichmann.us
Mon Jun 20 17:22:12 EDT 2022


On 6/20/22 12:01, Alan Gauld via Tutor wrote:
> On 20/06/2022 09:45, Roel Schroeven wrote:
> 
>>> NEVER initialised a DB/TBL this way. Easy for me to say: I learned RDBMS
>>> and SQL very early in my career, and therefore know to use the tools
>>> from that eco-system. (the rationale in books is the exact opposite -
>>> presuming the reader has never used DB-tools). Use the best tool for the
>>> job!
>> I don't really agree with this. I quite often use Python to read data 
>> from some file, perhaps process it a bit, then store it in SQL. 
> 
> Roel,
> 
> We weren't saying not to use Python for processing SQL data.
> It was specifically about creating the schema in Python
> (and to a lesser degree loading it with initial data). You
> can do it but it's usually much easier to do it directly
> in SQL (which you have to embed in the Python code anyway!)

This isn't as true (especially the "have to embed sql anyway") if you're
using an ORM.




More information about the Tutor mailing list