How to use SQL together with another programming language? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to use SQL together with another programming language?

I learned Python and SQL. But I think there should be another course teaching how to use SQL commands together with another programming language such as C or Python

24th Dec 2016, 6:25 AM
Maryam Sadeghi
Maryam Sadeghi - avatar
7 Answers
+ 5
You need to learn how to link SQL and python yourself, there is no complete guide for that. But there will always be other guides which you can use to link around, etc. Always remember that search engine exists
24th Dec 2016, 7:35 AM
Wen Qin
Wen Qin - avatar
+ 4
Indeed, there is almost no real use to a program language without databases (or really few). I'm sure that there must be a class that manages SQL for phyton.
24th Dec 2016, 7:14 AM
Nahuel
Nahuel - avatar
+ 1
Well then, the choice has to be made first. sqlite is a very lightweight dbms. So if your project is not very big, you can use it. And also sqlite module is already available in Python library, so you won't have to install anything. Later at some point, you may switch to MySQL or even MongoDB if you wish
24th Dec 2016, 11:28 AM
Rishi Anand
Rishi Anand - avatar
+ 1
The instructions to interact with database through sql is a part of python code Here is a good tutorial http://www.python-course.eu/sql_python.php
24th Dec 2016, 11:36 AM
Rishi Anand
Rishi Anand - avatar
0
Are you using sqlite or MySQL? Python has a built in module for sqlite. The MySQL connector needs to be installed
24th Dec 2016, 10:55 AM
Rishi Anand
Rishi Anand - avatar
0
@Rishi Well see that's the thing. I have learned python, but I don't know whether I shoud use Mysql or sqlite. And it says nothing about how to implement databases into the python program
24th Dec 2016, 11:24 AM
Maryam Sadeghi
Maryam Sadeghi - avatar
0
Thanks for your answer Rishi. and another question is, that is the same SQL programming codes are embedded inside a python code? Or the statements we want with SQL are saved in a file and then called from python?
24th Dec 2016, 11:31 AM
Maryam Sadeghi
Maryam Sadeghi - avatar