sqlite is my favorite database (beginner - intermediate) anthony explains

  Рет қаралды 76,033

anthonywritescode

anthonywritescode

Күн бұрын

Пікірлер: 46
@mjiii
@mjiii 2 жыл бұрын
I use sqlite3 as database for most of my projects (I mostly just need read-only data). One useful command to know is ".mode table" which makes query results much more readable, especially when you have multiline strings in one of the columns!
@PlayDelilah
@PlayDelilah 4 ай бұрын
Except when the content texts or column names are so long, the table's format become distorted
@PlayDelilah
@PlayDelilah 4 ай бұрын
Table mode works great until there is a really long named column or the content texts are really long. What do you do then? I just use ".mode column" with headers turned on
@mrswats
@mrswats 2 жыл бұрын
SQLite is great! Love the in-memory feature as it allows you to write tests for a web app without having to spin up a whole database (like postgres) or you can also plot it to a file storage for backup and recovery and whatnot. Super super nice.
@fsouza
@fsouza 2 жыл бұрын
Woah, 500! Just 12 until a big round-number milestone!
@JosephGallagher
@JosephGallagher 10 күн бұрын
The tutorial I'm currently working on uses MySQL but in real-life applications I'll be using SQLite, just trying to get a hold of what's to come your video is clear regarding what I can expect to achieve. Thank you
@ttcc5273
@ttcc5273 Ай бұрын
Secret sauce: learn from your mistakes . Double plus secret sauce: do a lot of projects on your own so you have a lot of mistakes to learn from
@hba6018
@hba6018 2 ай бұрын
WAL mode to avoid the locked database
@martinoantonio1994
@martinoantonio1994 Ай бұрын
Went to comment to write this
@christopherprobst-ranly6357
@christopherprobst-ranly6357 Жыл бұрын
Regarding concurrency: WAL mode broaw.
@morganp7238
@morganp7238 28 күн бұрын
good upload, one question, how do you define custom functions in async connections? a simple implementation of regex would do, thank you
@PetterWersland
@PetterWersland 2 жыл бұрын
Multiple writers works fine with Sqlite, just use 'PRAGMA busy_timeout' when you open the database. You can test it like this: seq 1 10 | xargs -P 5 --replace sqlite3 db.db "PRAGMA busy_timeout = 5000" "insert into wat values ({}')"
@anthonywritescode
@anthonywritescode 2 жыл бұрын
if by "works fine" you mean busy loops and waits while the whole db is locked then sure -- but you might as well use a mutex in code then
@PetterWersland
@PetterWersland 2 жыл бұрын
@@anthonywritescode Yes you could, but this is build in and works the same on Windows and Linux.
@purarue
@purarue Жыл бұрын
Ah, this is the reason why Ive never seen concurrent write failures myself, python's default timeout value is 5s, so it just waits in a busy loop if I have 'concurrent writers'
@blue.5768
@blue.5768 2 жыл бұрын
Happy 500th video!!
@johanwithag2432
@johanwithag2432 Жыл бұрын
It's excellent for typical any single user desktop PC applications.
@AceofSpades5757
@AceofSpades5757 2 жыл бұрын
Sqlite is incredible. You can even embed it into application binaries.
@ChristianBrugger
@ChristianBrugger 2 жыл бұрын
Interesting that you mention prototyping. What I found most frustrating with SQL are database migrations. I want a new column, different datatype, new table, change the key, but somehow keep the data. How do you deal with these things?
@anthonywritescode
@anthonywritescode 2 жыл бұрын
for me migrations are an extreme rarity so I haven't bothered with any complexity for them. when they come up I do a 3 stage rollout and forget that the old schema ever existed
@augustoerrecarte7076
@augustoerrecarte7076 6 ай бұрын
I've been watching sqlite videos for quite some time and I can't wrap my head around this, how is the whole ecosystem so bullish on a db where migrations are such a pita
@Stegodandy
@Stegodandy 7 ай бұрын
thank you anthony i am a beginnre coder and i was told sqlite is the best fo rthe small pet project im working on this is very helpful and easy to digest!
@DoctorMandible
@DoctorMandible 7 ай бұрын
In-memory databases are great for high i/o apps with transient data, like multiplayer game states.
@robertweekes5783
@robertweekes5783 2 ай бұрын
Run command .mode box 📦 To show neat lines around your data and headers 👍🏼
@AlexWillmer
@AlexWillmer 2 жыл бұрын
Happy 500th
@q1blaqi
@q1blaqi 2 жыл бұрын
#500 !!! congrats !
@niolss
@niolss Жыл бұрын
Do you have any good videos on sync between SQLite on android and a MySQL server?
@kimaegaii
@kimaegaii Жыл бұрын
it would be so cool to see how you did the twitch chat database step by step. great cxontent. thank you!
@anthonywritescode
@anthonywritescode Жыл бұрын
it was all developed on twitch! there's vods originally on this channel but then on @anthonywritescode-vods
@JohnZakaria
@JohnZakaria 2 жыл бұрын
Would you use orm like sqlalchemy or do you like your queries raw?
@anthonywritescode
@anthonywritescode 2 жыл бұрын
I rarely reach for an ORM, mostly dealing with parametrized plain queries. then again I'm rarely at a scale where the complexity warrants an ORM
@mikewurlitzer5217
@mikewurlitzer5217 2 жыл бұрын
Very nice video. Thanks! For a Flat File DB, I find SQLite amazingly fast and easy to interface with GAMBAS in Linux as my GUI. The ONLY issue I've been unable to solve is to have a copy on my NAS {RasPi running OpenMediaVault} or just a RasPi with a thumb drive so that 2 users, can read/write to it {but never at the same time, usually hours apart} Reads are fine but I can never write to it. on my NAS or standalone Pi and it's thumb drive. Every attempt to CHOWN or setting permissions to 777 fail. As I run SSDs on everything I'm very interested in the in-memory feature to minimize writes especially during the development/testing/debugging phase.
@greyshopleskin2315
@greyshopleskin2315 5 ай бұрын
File locking on network devices is buggy both on Linux and Windows. Maybe thats the issue. You commented a year ago, but if you still have the same problem here is a solution: Since the read/write operations are hours appart, and assuming your db is not huge, you can just copy the db to local disk, do whatever needed, and upload the file back to the network device
@gabrielatoma9725
@gabrielatoma9725 5 ай бұрын
Don't have a clue what I just watched. My phone downloads this torrent all by itself every night which consists of a jpg, an SQLite and an XML. I delete it and the next time I go to sleep I wake up to find the same 15K file. Anyone know what could be going on?
@mfjones9508
@mfjones9508 7 ай бұрын
Any alternatives that are good at handling multiple writers ? I looking for an alternative with python binding.
@Senumunu
@Senumunu 5 ай бұрын
i only want to open an .exe file that is saved as sqlite why is it so hard ? i still cant figure it out
@stephendeese97
@stephendeese97 Жыл бұрын
Great Video. Any chance you could share your terminal theme?
@ShadowManceri
@ShadowManceri 6 ай бұрын
Isn't that just Ubuntu default, or maybe even gnome default.
@premiumblue123
@premiumblue123 Жыл бұрын
Hi, do you know where to host django project with sqlite online?
@farzanehvalipour5666
@farzanehvalipour5666 3 ай бұрын
How can I use my own data?
@SuperMBARutgers2013
@SuperMBARutgers2013 Жыл бұрын
Hi. What keyboard is that?
@anthonywritescode
@anthonywritescode Жыл бұрын
there's an faq playlist linked in the channel which has a video about the keyboards
@TypeErrorDev
@TypeErrorDev 2 ай бұрын
What is that keyboard though! Lol
@vikingthedude
@vikingthedude 5 ай бұрын
Whats a wat
@gardnmi
@gardnmi 2 жыл бұрын
duckdb has replaced sqllite for me.
@willi1978
@willi1978 Жыл бұрын
i tried duckdb too. i guess it depends what use case you use it for. transactions i would keep in sqlite. duckdb still has no backwards compatibility in storage format, need to be careful with that
SQLite Introduction - Beginners Guide to SQL and Databases
21:49
Caleb Curry
Рет қаралды 45 М.
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 4,9 МЛН
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 2 МЛН
7 Database Paradigms
9:53
Fireship
Рет қаралды 1,6 МЛН
Sqlite Is Getting So Good
28:52
ThePrimeTime
Рет қаралды 205 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 215 М.
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,6 МЛН
SQLite Backend for Beginners - Create Quick Databases with Python and SQL
13:32
MySQL - The Basics // Learn SQL in 23 Easy Steps
17:17
Fireship
Рет қаралды 912 М.
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 4,9 МЛН