A beginner-friendly walkthrough of creating a first SQLite database using DB Browser for SQLite, from creating the file to defining a table with SQL and inspecting it in the GUI.
Key Takeaways
- SQLite databases are single files, making them simple to create and share.
- DB Browser for SQLite provides a straightforward GUI for creating databases and inspecting data.
- A table can be created with a simple SQL CREATE TABLE statement executed inside the tool.
- The command-line method for creating a SQLite database is a separate topic covered later.
What the video covers
- Introduces SQLite as a free, file-based database where an entire SQL database lives in a single disk file.
- Recommends DB Browser for SQLite as an easy GUI tool for creating and browsing databases, found via a Google search and downloadable from its GitHub page.
- Shows how to create a new database through the 'New Database' button and choose a file location (a 'test' file in a documents folder).
- Notes that after creating the file, the tool prompts for a first table, but the presenter opts to write SQL directly.
- Demonstrates a CREATE TABLE statement defining a table named 'test' with a varchar(100) name column and an ID column.
- Confirms the table was created successfully by checking the Database Structure tab and browsing the data.
- Mentions that creating a database via the command line will be covered in a follow-up video.
- The presenter plans a series of SQLite videos and asks viewers to subscribe.
Full Transcript — Download SRT & Markdown
Speaker A
okay welcome back everyone I haven't made a video in a while and something I wanted to do is do a few videos on sqlite in today's video we're going to look at what is the easiest way in my
Speaker A
opinion to create a sqlite database and get started with using sqlite so if you like this kind of content before we get into it uh please consider subscribing that way you don't miss any videos I make in the future that you might find
Speaker A
interesting or useful or maybe at least entertaining really this channel is just me what I learn either work or on my own and trying to regurgitate that and hopefully help you out at the same time but to be honest I haven't used sqlite
Speaker A
in a while and I don't know why but I thought this would be a fun couple or many videos to make for you guys if you don't know what sqlite is it's free for anyone to use and it's really just a
Speaker A
database that lives in a file they say sqlite reads and writes directly to ordinary disk files and pretty soon we're going to go ahead and create our own disk file so basically the entire database and they say that right here a
Speaker A
complete SQL database with multiple tables indices triggers and Views is contained in a single disk file which is very impressive if you want to learn more about this I'll have sqlite's website linked down below and I'll also have linked down below the tool we're
Speaker A
going to use which is the database browser for sqlite if you Google sqlite I think this is the third link that actually comes up I already have this downloaded and installed but you'll just go to the download button and install it
Speaker A
by clicking this downloads button and it'll take you to their GitHub so once you have that downloaded installed if you're curious what version I have because I actually don't know I have 3.11.2 so I'm a little bit behind what's
Speaker A
currently out there but it's all probably going to be the same and what's really nice about this tool is not only can you easily create a new database but you can actually look at all of the data through this GUI very easily so when we
Speaker A
want to go ahead and create a new database you can see there's a button here in the top left that says new database it's a little small maybe for you guys but if you click that we can then pick where we
Speaker A
want our database file to go so for me I'm going to create a new directory in our documents folder called sqlite and let's just call this test and I'll hit save and that will create our sqlite database if I go ahead and look at that
Speaker A
directory here is what the database file looks like it's test dot DB and right after creating this it prompts us to go ahead and create our first table I'm going to exit out of this and really we could use the GUI and we'll do that in a
Speaker A
future video but I'm going to very easily just use SQL to go ahead and create our table so create table we'll give it some kind of name let's also name it test and here we can have a column name which is going to be a
Speaker A
varchar of maybe a hundred and maybe an ID um that's an end okay and if we execute this we can see the result query executed successfully took one millisecond we look at our database structure tab now under tables we now
Speaker A
have a one meaning we have a table inside of our new database and here it is test if we go ahead and click on it and browse the data we now see those two columns that we described we have name
Speaker A
and ID and if we go back to our database structure and we expand our test table that we created we can see our two columns so we have name and ID and the two data types all right so that's it
Speaker A
for this video we went ahead and we created our first or maybe your first sqlite database very easily in my opinion there's another method to do it that's via the command line and I'm actually going to show that method in
Speaker A
the next video if you're interested so thanks so much for watching hope to see you in a future video and take care
Topics:SQLitedatabaseDB Browser for SQLiteSQLcreate tablebeginner tutorialdatabase tutorialSQL basicscommand line











