#100DaysOfCode in Python Transcripts
Chapter: Days 91-93: Database access with SQLAlchemy
Lecture: Demo: Seeing the database
0:00 Before we put the wraps on our game,
0:01 let's have a quick look inside the database.
0:03 Julian already talked about DB Browser for SQlite,
0:06 runs on all the platforms this little thing.
0:08 This is quite cool and if this is what you want to use
0:11 I totally recommend it.
0:12 It looks quite nice.
0:13 I'm a fan of PyCharm and PyCharm also
0:16 already has tools for this.
0:18 So if you go over to database,
0:19 and you hit the + and say data source.
0:21 Now if we pick Sqlite serial,
0:24 you'll have to make sure if it doesn't say driver,
0:26 there's a little button to say download the driver here.
0:30 So if you don't do that, this is not going to work.
0:32 But once that is done,
0:33 I'm going to drag from here to there,
0:35 you can actually see what is in our database.
0:37 Go to schema, to main, hit our moves players rolls.
0:40 Roll moves is most interesting, let's look there.
0:42 Here you can see it's all the various pieces.
0:44 These orange things mean these have indexes.
0:48 Here's the actual details.
0:49 I can even come over here, jump to the console
0:51 and say select star from, move to where,
0:55 and you get all sorts of details.
0:56 Like let's say player id equals one, that's probably me.
1:00 Then there's all the moves that I made
1:03 since I entered first into the game.
1:05 Pretty sure my id is one, we can check that.
1:07 Anyway here's how we query it,
1:08 and you can see all the different games
1:11 that this has been running in and so on.
1:13 So this is really nice when caveat
1:15 this only works in PyCharm professional.
1:17 If you have PyCharm community
1:18 well you're going to need to use something else right.
1:21 The database access stuff is not part of that
1:22 so I'd check out that DB browser for Sqlite.