Python Using Databases in Python Our Diary App Doing Data Entry

How to enter into database using the sqlite command on Windows

How do i access the sqlite to check for entries like on the video. Im using Python IDE on windows

3 Answers

Andreas cormack
Andreas cormack
Python Web Development Techdegree Graduate 29,726 Points

I am not sure what python IDE your using but you can access the python shell on windows by typing python into the command prompt.

Once in the shell type

1) sqlite3 'database name'
2) .tables will list all the tables in the database.

Ensure that sqlite3 is installed on your machine.

Do I have to install it separately, I thought it comes bundled with Python installation. Im using Python 3.4.3 and the code for creating the db including tables is running and I can see the created db in the folder on windows explorer

Andreas cormack
Andreas cormack
Python Web Development Techdegree Graduate 29,726 Points

It doesn't come installed with python you need to install it separately. I use a linux machine so its pretty straight forward with a apt-get install sqlite3 but for windows you can try this link.

http://www.codeproject.com/Articles/850834/Installing-and-Using-SQLite-on-Windows

Even though the ORM creates the DB you need a tool to view it, its similar to access db in many ways where you can have the .db file but cant do anything with it without the MS ACCESS.

hope that helps