Python Forum

Full Version: Create database in python module ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to create
database in python not confuse
with connect to external database.

And then write, import to and from it
to and from excel ?

Like how .Net you can create a
database in Visual Studio ?
can you elaborate more on what your goal is?
(Sep-02-2019, 04:45 PM)buran Wrote: [ -> ]can you elaborate more on what your goal is?

Yes the goal is to create exe to store
data in the embedded program and run SQL statements
or when connecting to externally SQL, can still create
tables internally that can help or assist with creating
Creative programs ?
you can create sqlite3 database. support for it comes with the standard library
https://docs.python.org/3.7/library/sqlite3.html

you can store on disk for persistence or create in RAM
(Sep-02-2019, 05:01 PM)buran Wrote: [ -> ]you can create sqlite3 database. support for it comes with the standard library https://docs.python.org/3.7/library/sqlite3.html you can store on disk for persistence or create in RAM

Nice, this is embedded into the executable or is separate ?
(Sep-05-2019, 12:00 AM)Johnse Wrote: [ -> ]Nice, this is embedded into the executable or is separate ?
Not sure what you mean here...
But it is part of Standard Library. i.e. no need to install extra packages. Just python is enough.
sqlite3 module in the docs: https://docs.python.org/3/library/sqlite3.html
small tutorial: https://pymotw.com/3/sqlite3/index.html