1

I am building a web application in Flask.

We have opened up the database window of PyCharm and established a data source to a SQL server database.

My question is what does establishing a data source do?
Does is remove the need to connect to a database manually?, like for example

 db = MySQLdb.connect("localhost","testuser","test123","TESTDB" )

If the answer is yes it does remove the need to set

updb = MySQLdb.connect("localhost","testuser","test123","TESTDB" )

then how can you access the data in the database, and establish a cursor object?

davidism
  • 121,510
  • 29
  • 395
  • 339
Abbadon771
  • 21
  • 5

1 Answers1

0

The JetBrains IDEs such as PyCharm or IntelliJ have a database browser, basically productionalized as it's own IDE called DataGrip, but that's besides the point.

Fact is, no, that doesn't replace the need for code, and you could have zero code and make a database connection, or entirely code and never touch the database window, ever (because you don't need PyCharm to write said code).

So, they are separate things, just like how "SQL Server" means something completely different from "MySQL" (e.g. you might need a different library)

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245