Myke, excellent video! I’ve been searching for a suitable and easy-to-understand tutorial on Node with sqlite3 for a long time. Thank you very much for your content!"
I've worked with many different databases and have experience, but didn't know how it works in node ( been learning node for 2 hours total :D ). After you showed how to make a query and execute it I left the video, but wanted to thank you for making it simple and not going on for 40 minutes.
You got like instantly ^^! Really Thank You, daily I'm working with front-end but my friend asked for help with full-stack app. I just have spend 3 days with learning docs and searching. This video saved my mental health and weeks of learning. You are the best 🚀
Thanks for the great tutorials, especially the pace! Some others try to break speed records, apparently. You give us time to digest your excellent content!
Great job, Thank you. Watched another tutorial which was not as eventful. Only issue encountered was npm i sqlite3 deprecated error. replaced with npm install sqlite3.
hey Mike, quick tip, because I noticed that the audio (your voice) is barely audible compared to almost every other video on youtube: use a little bit of compression to boost the audio, or use some 'Normalize' processing. This should help tremendously.
What does the ".verbose" do at the end of your packing requirement? I took an online course for NPM and sqlite3, but honestly, they were trash. The course didn't include the second and third arguments in your DB creation, as well as not using the verbose option when requiring sqlite3. Can you quickly explain?
this made it super easy! but i've got a question let's say if my database was full of stuff, how would i go about searching for a specific user in the database?
You would want to use a WHERE clause in a select query. I have a full in depth video covering WHERE clauses in SQLITE here : ua-cam.com/video/7AtIjM6_EM8/v-deo.html The clause would look something like this: "SELECT insertColumnName/s FROM insertTableName WHERE user = insertUserData" Please let me know if further help is needed after watching that video :)
Glad you enjoyed it! This would essentially be impossible without node, or another JavaScript runtime environment such as bun or deno. These environments are what allow us to run JavaScript outside of the browser. This could easily be done without NPM if you download the package manually and link to it in your main file. If you mean without using the library at all though, that would be extremely difficult and time consuming as you'd have to create your own which would suck haha
Trying to create a website that allows users to upload images, stores those images in a database, and creates a new website url with a unique tag for the image. That way a user can go to that website to view their uploaded image. Lost on where to start, any advice?
Hi, thanks for the video... I needed it. But I was wondering, how can I use the queries with values from forms in html? I'm struggling to understand this method. I know how to do in PHP, with $_POST and the other methods, but I need to do the same thing in JS. Have you any advice or any video or maybe a web site when they teach about it? Thank you again.
If you are using Express, which I highly recommend using. You want to grab it using the request variable in the post method. Here is an example where I use express and postman ua-cam.com/video/mnH_1YGR2PM/v-deo.html . Here is an online example nodejs.dev/learn/get-http-request-body-data-using-nodejs
You would need to set up a frontend connected to it using either html/javascript/css, or a popular front end framework like react or vue. This video only covers the backend
Hello Mike, that was a great video! I want to build a project but don't know where to start. Having my own local database file (SQLite) I want to develop a web app just to display the database. (I also want to draw some graphs based on that database on the web app, but let's take it step by step). Where i should start? Right after this comment i am going to check you u have got any tutorials on that. Thanks in advance Mike
Hey Matteo! This video is a great place to start. To make it simple I'll break it up into a few sections that you'll want to learn to build the full app Backend: 1. Working with sqlite - learn how to set up a database, insert, delete, retrieve, and retrieve with a filter 2. Creating the API / ROUTES. This video will be helpful for SQLite and Node JS routes ua-cam.com/video/mnH_1YGR2PM/v-deo.html - You'll need a GET route that does a select all and ideally have a way to filter, see how I do it via query parameters in that video - If you want to store data in the database as well via a form or something on the front end, you will also need a POST route Frontend: 1. Create the basic form or whatever that handles filtering, and do some kind of GET request to the API 2. Grab the response from the get request and turn it into a graph. I recommend checking out chart.js if you're using vanilla js www.chartjs.org/ Hopefully this helped! Let me know if you have any other questions
You'll want to use an HTML form that POSTS the data or post it via JavaScript (frontend). Then set up a route in Node js express. Here is an example where I set up a route ua-cam.com/video/mnH_1YGR2PM/v-deo.html . You would just use a form or JavaScript instead of postman
If you're getting that error, then you likely either did not create the table by successfully running the "CREATE TABLE xxx" sql, or you have a typo in the table name. This typo could be in the create table sql or where you are currently trying to use it. I recommend looking at my source code and comparing it to yours.
@Ariel Yabo Here is the video using async await ua-cam.com/video/0-Xu3tnMEiI/v-deo.html. I do have a github, I don't upload all my code here, but I do upload some of the code for my bigger videos github.com/miketona
@@ananasios Gotcha that makes sense. Thanks for the clarification. Rows is an array of objects so you can return it the same way you would any other variable. I would personally wrap the db.all inside of a function and then you'd use a return statement saying "return rows". If it helps there is an example here ua-cam.com/video/mnH_1YGR2PM/v-deo.html at around 9:50 where I return rows as a JSON object using express for an API. Another, and perhaps easier, option is to use async await, I'm planning to make a video showing how to do that with sqlite3 in the near future.
@@bytemyke Since asynchronous database queries, the word "return" in the function will work faster than the query to the database and instead of rows will return undifinded.
@@ananasios Yes you would have to use return similar to the way I do in that video with express. Or you would have to use async await so that it is not undefined
npm ERR! node-pre-gyp WARN Hit error ENOENT: no such file or directory, open 'D:\path\to\your\cert.pem' npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.4.0 npm ERR! gyp info using node@16.20.1 | win32 | x64 this type of error it is showing when installing npm i sqlite3
Written tutorial and GitHub source code : bytemyke.com/blog/how-to-use-sqlite-in-node-js/
For the first time, i have learned something about Sqlite only for your video content, thanks a lot
Myke, excellent video! I’ve been searching for a suitable and easy-to-understand tutorial on Node with sqlite3 for a long time. Thank you very much for your content!"
I've worked with many different databases and have experience, but didn't know how it works in node ( been learning node for 2 hours total :D ).
After you showed how to make a query and execute it I left the video, but wanted to thank you for making it simple and not going on for 40 minutes.
Glad it helped!
You got like instantly ^^! Really Thank You, daily I'm working with front-end but my friend asked for help with full-stack app. I just have spend 3 days with learning docs and searching. This video saved my mental health and weeks of learning. You are the best 🚀
Glad I could help! Good luck with the app
Thanks for the great tutorials, especially the pace! Some others try to break speed records, apparently. You give us time to digest your excellent content!
Thank you I'm from Venezuela and I couldn't find tutorials on this topic in Spanish, really thank you very much
and again, best SQL JS tutorial out there, few extra thing compared to "blurry" version !
Thanks again!
Yo! Thanks Myke! Easy and to the point, keep it up 💪
Thanks! Will do!
I need this for our software engineering 1 subject this semester.
nice timing😍
Glad I could help! I have a BS in CS and UA-cam got me though it haha
Super useful, No yapping, Keep up the great work brother
Great job, Thank you. Watched another tutorial which was not as eventful. Only issue encountered was npm i sqlite3 deprecated error. replaced with npm install sqlite3.
Dude, thanks! Now i can store data no using Json :))
Incredible tutorial, subbed!
Thank you!
Very clear and direct to the point! Thanks a lot.
I'm really thankful for this video. This great help lead me to my mental relaxation 😅
thanks man, can you up the volume in the coming videos? that would be really better ;)
mike! u the best keep it up man!
Thank you! 😁
thanks for the vid, finally shows how to use it.
Great tutorial. Would be nice to have a gist for the final source code
hey Mike, quick tip, because I noticed that the audio (your voice) is barely audible compared to almost every other video on youtube: use a little bit of compression to boost the audio, or use some 'Normalize' processing. This should help tremendously.
Great video! Super helpful!
Just what I was looking for, thanks!
commenting for the algorithm! and of course thank you!!
Thank you!
Great video. Thanks a lot!
thanks man, very useful, keep up the goodwork
Please would you do a video on how to upload a whole folder with files to AWS s3 bucket with the version 3 using node js
awesome content, very helpful and straight to the point! keep up the good work
What does the ".verbose" do at the end of your packing requirement? I took an online course for NPM and sqlite3, but honestly, they were trash. The course didn't include the second and third arguments in your DB creation, as well as not using the verbose option when requiring sqlite3. Can you quickly explain?
this made it super easy! but i've got a question
let's say if my database was full of stuff, how would i go about searching for a specific user in the database?
You would want to use a WHERE clause in a select query. I have a full in depth video covering WHERE clauses in SQLITE here : ua-cam.com/video/7AtIjM6_EM8/v-deo.html
The clause would look something like this:
"SELECT insertColumnName/s FROM insertTableName WHERE user = insertUserData"
Please let me know if further help is needed after watching that video :)
Good stuff my friend!
you created the database wright test.db if i want to acess the that same database in my system how we can connect
Thanks Myke!!!
Thanks dude, amazing vid .. liked + sub .. I just was not sure why you use template literals instead of simple quotes or even double quotes
Super!!! 🎉
Thank you!!!!
Welcome 😊
What is the efficient gui for SQLite db
Ты очень крут, спасибо за эти видео😍
is there any need to 'commit' the changes or does the db.run function directly commits the changes to the database when called?
Do you know how to create a PATCH route that would allow you to edit an entry from the database and display it in the HTML?
Is there a way to make models for the sqlite database for bigger projects?
How difficult would this be without node/npm? Great tutorial, thank you.
Glad you enjoyed it! This would essentially be impossible without node, or another JavaScript runtime environment such as bun or deno. These environments are what allow us to run JavaScript outside of the browser. This could easily be done without NPM if you download the package manually and link to it in your main file. If you mean without using the library at all though, that would be extremely difficult and time consuming as you'd have to create your own which would suck haha
Please how to use JDBC for sqlite in VSCode
☹
Trying to create a website that allows users to upload images, stores those images in a database, and creates a new website url with a unique tag for the image. That way a user can go to that website to view their uploaded image. Lost on where to start, any advice?
Hi, thanks for the video... I needed it.
But I was wondering, how can I use the queries with values from forms in html?
I'm struggling to understand this method. I know how to do in PHP, with $_POST and the other methods, but I need to do the same thing in JS.
Have you any advice or any video or maybe a web site when they teach about it?
Thank you again.
If you are using Express, which I highly recommend using. You want to grab it using the request variable in the post method. Here is an example where I use express and postman ua-cam.com/video/mnH_1YGR2PM/v-deo.html . Here is an online example nodejs.dev/learn/get-http-request-body-data-using-nodejs
필요한 강의였어요 추천합니다
How do you make it visual? like a Delete button
or add button
You would need to set up a frontend connected to it using either html/javascript/css, or a popular front end framework like react or vue. This video only covers the backend
Hello Mike, that was a great video! I want to build a project but don't know where to start. Having my own local database file (SQLite) I want to develop a web app just to display the database. (I also want to draw some graphs based on that database on the web app, but let's take it step by step). Where i should start? Right after this comment i am going to check you u have got any tutorials on that. Thanks in advance Mike
Hey Matteo! This video is a great place to start. To make it simple I'll break it up into a few sections that you'll want to learn to build the full app
Backend:
1. Working with sqlite
- learn how to set up a database, insert, delete, retrieve, and retrieve with a filter
2. Creating the API / ROUTES. This video will be helpful for SQLite and Node JS routes ua-cam.com/video/mnH_1YGR2PM/v-deo.html
- You'll need a GET route that does a select all and ideally have a way to filter, see how I do it via query parameters in that video
- If you want to store data in the database as well via a form or something on the front end, you will also need a POST route
Frontend:
1. Create the basic form or whatever that handles filtering, and do some kind of GET request to the API
2. Grab the response from the get request and turn it into a graph. I recommend checking out chart.js if you're using vanilla js www.chartjs.org/
Hopefully this helped! Let me know if you have any other questions
How can I pass a html option value into the ‘?’ SQL select statement?
You'll want to use an HTML form that POSTS the data or post it via JavaScript (frontend). Then set up a route in Node js express. Here is an example where I set up a route ua-cam.com/video/mnH_1YGR2PM/v-deo.html . You would just use a form or JavaScript instead of postman
How do I fix "no such table: xxxxx"? The table exists I'm sure
If you're getting that error, then you likely either did not create the table by successfully running the "CREATE TABLE xxx" sql, or you have a typo in the table name. This typo could be in the create table sql or where you are currently trying to use it. I recommend looking at my source code and comparing it to yours.
thanks you very much :D
I got this error SQLITE_CANTOPEN, unable to open database file
me to?????
I have a question... What type of db is the SQLite??? Is it one if the personal database
SQLite is an sql database that takes the form of a file. To be exact it is an embedded file-based relational database management system.
Do you know any free gui tool fo SQLite... I mean for ever free gui tool that we can install on windows 10 desktops or mac or lonix machines
I'm sorry, I do not know of such a tool. I have been thinking of making a browser based GUI tool for sqlite, would that be of interest to you?
@@bytemyke Okay will be waiting for that... let see how that can really help.... How long have you been using sqlite?
can we get closer on social media?? perhaps whatsapp or instagram?
@@goodluckoriuwa1669 Sure! I have my linkedin in my youtube profile if you would like to connect with me there.
Nice thanks!
why sqlite3 instead of sqlite.js?
Thank you, like🙂
why is the data you log into the terminal formatted? @8:00 ?
He must have installed auto formatter vs code extension
How do I do it with async and await? Do you have any video?
I don’t, but I’ll make one and reply with the link when it’s done
@Ariel Yabo Here is the video using async await ua-cam.com/video/0-Xu3tnMEiI/v-deo.html. I do have a github, I don't upload all my code here, but I do upload some of the code for my bigger videos github.com/miketona
Glad I could help! Good luck on your coding endeavors!
Thanks!
Of course! Thanks for watching!
Thanks dude
Is there a github repo for this code?
I’m sorry, there is not
Myke you need to check your mic
Very cool. Is it possible to have a password to access the database?
That’s a great question! It is not possible to have a password/username in the traditional sense like what you’d see with a mysql database.
how to make return data?
I’m not sure what you’re asking. Could you explain a bit more?
How to make the db.all function return rows. Not console.log(row), but return rows
@@ananasios Gotcha that makes sense. Thanks for the clarification. Rows is an array of objects so you can return it the same way you would any other variable. I would personally wrap the db.all inside of a function and then you'd use a return statement saying "return rows". If it helps there is an example here ua-cam.com/video/mnH_1YGR2PM/v-deo.html at around 9:50 where I return rows as a JSON object using express for an API. Another, and perhaps easier, option is to use async await, I'm planning to make a video showing how to do that with sqlite3 in the near future.
@@bytemyke Since asynchronous database queries, the word "return" in the function will work faster than the query to the database and instead of rows will return undifinded.
@@ananasios Yes you would have to use return similar to the way I do in that video with express. Or you would have to use async await so that it is not undefined
Man this audio volume is too low!
The rest is nice.
wait! what? this is not async!
This is not. I have an async / await tutorial version here ua-cam.com/video/0-Xu3tnMEiI/v-deo.html
✌️👍🇹🇷
npm ERR! node-pre-gyp WARN Hit error ENOENT: no such file or directory, open 'D:\path\to\your\cert.pem'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.4.0
npm ERR! gyp info using node@16.20.1 | win32 | x64
this type of error it is showing when installing npm i sqlite3