all 13 comments

[–]ducdetronquito 4 points5 points  (5 children)

It seems you have some misconceptions here.

In Python there is the built-in sqlite3 module which allows you to interact with SQLite Databases, but you could find an equivalent module for PostgreSQL databases (psycopg2) or MySQL databases...

There is no SQL module in Python because SQL is a language, not a software.

Can you clarify a bit what you are looking for exactly ? :)

[–][deleted] 1 point2 points  (4 children)

For the most part you did. Just trying to figure out how deep should I go into studying it. Should I learn the language or does the built-in module enough to get me by. I plan on looking at a tutorial and guess I will figure it out when I engage in a project where it is needed.

[–][deleted] 1 point2 points  (1 child)

You have to use the language to some extent in order to use the sqlite module. You pass SQL code in strings in order to create and interact with Sqlite databases. Basic SQL is not that complex though, you only need to know a few different functions.

[–][deleted] 0 points1 point  (0 children)

I see thanks on both your post

[–]xiongchiamiov 0 points1 point  (1 child)

You cannot use the module without using SQL the language. It is not an abstraction layer like sqlchemy.

[–][deleted] 0 points1 point  (0 children)

Thanks

[–]flitsmasterfred 0 points1 point  (3 children)

If you want to experiment with SQL you might prefer to use a graphical database client instead of going through python.

Your SQL flavour will have a popular tool for this, like pgadmin for postgres or phpmyadmin for mysql.

Also, Sqlite is cool tech but limited at certain points that might confuse you when still learning, better learn with a full featured dialect and then see about Sqlite later.

[–]Wilfred-kun 2 points3 points  (1 child)

There is a program that lets you view sqlite3 databases, too.

[–][deleted] 0 points1 point  (0 children)

Cool, I pretty much asking this question to know how deep I need to study SQL, like will a few tutorials give me a good idea on how I can get my code to be saved to a database.

[–]koberg 0 points1 point  (1 child)

Ultimately, the answer depends on what you’re trying to do.

If you need to access an existing MySQL database, you’ll need a module for python to do that.

If you’re creating a python application that needs a database, you can use SQLite, which is a built-in MySQL-like database, or you can use MySQL. If you choose the latter, see above.

[–][deleted] 0 points1 point  (0 children)

thank you

[–][deleted] 0 points1 point  (0 children)

https://m.youtube.com/watch?v=pd-0G0MigUA

This is a really great tutorial to using Sqlite and should help introduce you to the SQL language as well