+ 3

How Can I to connect sql & python?

I want to use database in python.I installed pycharm in ubunto. 1 : sql server is supported linux ? 2 : mysql is easier than sql server? 3 : how can I connect database and python?

10th Aug 2019, 4:36 AM
Ali Badri
Ali Badri - avatar
3 Answers
+ 7
Sql alchemy is a good library for connecting database to python script
11th Aug 2019, 4:59 AM
Nic Beltrante
Nic Beltrante - avatar
+ 3
hallo, i use sqlite3 is easy.... an example. import sqlite3 conn = sqlite3.connect('clientes.db') conn.close()
11th Aug 2019, 2:18 AM
conta excluĂ­da
conta excluĂ­da - avatar
+ 2
You can install ms sql server on linux yes, but why would you want to do that? 😰 Not clear what you mean by 'easy'. Easy to install? Easy to use? There is not much difference in the functionality except on the scripting side. MySQL or PostgreSQL are perfectly valid options and completely free + open source. https://db-engines.com/en/system/Microsoft+SQL+Server%3BMySQL%3BPostgreSQL If you only need a lightweight solution then you can also consider sqlite3 which is built in standard python. For other databases you need to find and install an external library to be able to connect. https://code.sololearn.com/csZ5bjiWfdCR/?ref=app
10th Aug 2019, 4:57 AM
Tibor Santa
Tibor Santa - avatar