SQL Explained in 100 Seconds
HTML-код
- Опубликовано: 5 июл 2024
- Learn the fundamentals of Structured Query Language SQL! Even though it's over 40 years old, the world's most popular databases still run on SQL.
Foreign key basics docs.microsoft.com/en-us/sql/...
#dev #database #100SecondsOfCode
Draw SQL Diagrams drawsql.app/
Install the quiz app 🤓
iOS itunes.apple.com/us/app/fires...
Android play.google.com/store/apps/de...
Upgrade to Fireship PRO at fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
My VS Code Theme
- Atom One Dark
- vscode-icons
- Fira Code Font - Наука
Why am I watching this when I have 10 years of SQL experience? Can't get enough of these videos!
@John Doe Sounds like SQL was too difficult for you
@@shishkebab64 🤣🤣🤣
I probably used MongoDB about 9 years ago for the first time 😄 The two aren't mutually exclusive
@@shishkebab64 LoL 😂😂😂
Passive agressive much @everyone
Maybe we can change the title to: "Your College Semester in 100 seconds"?
Lmao 🤣
🤣🤣🤣
Yess
This would cover the first 3 weeks of my 1st DB module in college
still more comprehensive than my college DB modules
sequel for short, now that's how you settle both sides of a debate
If you want to shorten it, say "squeal". Save another syllable.
im sure that he spent a little bit of time figuring out how to make everyone satisfied haha
And pronounce "vi" "six"
The guy who coined it pronounced it as “sequel”
@@stolensentience that line of reasoning has not settled the gif pronunciation debate either.
SQL: Instead of describing every step necessary to produce a wanted end result, you instead describe what you want the end result to look like, and the database will figure out the steps necessary to produce that end result for you. This aspect of SQL and query engines have always fascinated me.
P
@@luisbeneyto6154 riveting statement
Well, it was just ahead of it's time with all this: the computer knows better
spoiler: it doesn't
@@user-bj4lp3fr1o And now I can tell chat GPT about a database and ask it in plain english what Data I want and it can write a valid query 99% of the time
lol why did they make sql when they can just use a filter on an excel sheet? dumb nerds!
An SQL Query walks into a bar and goes up to two tables and asks "Can i join you?"
An*
in 100 minutes/days/years... We'll never know
Edit: The title originally didn't contain "Seconds"
lol, its funny that i said that first but you got more likes :D
@@samarmohan9891 it's funny that you are tracking his numbers of likes
@@samarmohan9891 How the turntables.
That's what happens when you publish from your phone 🤦♀️
@@Fireship gotta make an AI for that
Some pro tips after years of experience: use singular type (table) names, use a fully descriptive name for the primary key (player_id, team_id, ...) and reuse those names for foreign keys, make sure to properly apply constraints (foreign key constraints and for example a column can only contain a value between 0 and 10), try to avoid NULLs as much as possible, don't bother with datetime types (just use bigint unix timestamp and always ALWAYS store in UTC), learn as much about your database server as you can because it can do a lot more than you think, use the force!
I've always wanted to use a bigint Unix timestamp but wherever I've worked they always use a date time. Had to fix so many bugs related to timezones.
DrawSQL looks like such a neat tool.
thanks for the tool name :) was actually curious about it. Too bad there isn't a free variant on this
@@frankhuurman3955 There is, for public tables
@@frankhuurman3955mysql workbench, it ain't that beautiful to look at but its good, else you can pirate dbforge
@@SumanRoy.official Thanks! I'll check it out :)
The only channel where I'd watch something i already know about regarding computer science, your videos are captivating man, keep it up
cuz it's short and sweet with soothing and relaxing voice
@@kushal6065 lmao true
I am just now learning SQL Server and your video is God-sent. I mean, the concise explanation, the language used, the graphical representations, etc. It's just perfectly done!
when reccomendations are quicker then notifications
Yep
Lmao same
I was searching for this!
Thank you for the video!
Keep the hard work going! 🔥🔥🔥🔥
Early enough for the title to be "SQL Explained in 100' without the 'seconds'
title written in less than 100 lmao
yes
Holy crap... now I know how effective being early is when making your comment.
They took half a year to explain this in Uni and you did in 100 seconds, nicely done! I might be wrong, but at 2:01 the "primary" and "foreign" labels seem to be swapped.
You are right about the last point. You seem very focused haha.
it's more like it takes half a year to fully understeand what is he saying in those 100s
I bet they took half a year to explain this and *much* more to give you a proper understanding. If they didn’t, you got ripped off.
Thanks for this cuz I was confused a bit
Why did I learn more from this 100 second free RUclips video than the thousand dollar university course I took
I'm a huge basketball fan and know nothing about sql but the fact that you used basketball as your example really helped me alot
Thanks to this I understand what primary key and foreign key is. I would like to see an extended tutorial on all JOINs and some random Clauses like Trigger.
I love watching your explanations before I really dive into something, and then later after I've done some more in-depth learning. Still waiting on the rewatch for when I actually "know" something though
Greg Ostertag... there's a blast from the past.
Another great vid Jeff. Thx! 👍🏾
I am an amateur developer and your videos have really helped me gain spherical knowledge on CS
>Video about SQL
Everyone else: Talk about database, data manipulation, MySQL, PostgresSQL, SQL Server, etc.
Me: Civilization V & VI modding!
I'm required to take a database class for my cs degree, this video just summarized the entire content of that class
Wonderfully efficient, thank you. This was a master class in minimalized visual explanation .
This was great, I cant wait for the SQL !
I'm trying to learn SQL and this video gives me a bit more understanding! It helps 👍
I really like your videos! Short, but FULL of content. Thanks for sharing ;)
Sorry for the downer but in MS SQL Server the statement at the end of the video wouldn't work. The WHERE clause has to come after the JOIN statement. I haven't used much of MySQL and haven't touched any of the others so not sure if the syntax varies and it lets you do it that way.
My college makes us use the oracle standard and I don't think it would work either.
LOL this logic in the video wouldn't work anywhere. They all need the source before they can limit the source's data. So joins come before the where clause. i've worked on ms sql, mysql, redshift, snowflake, oracle, sqlite, access...all kinds of tech. good catch. very astute.
Absolutely love these series!
I just love your explaination....Simple...Short...Superrr 🥳
I think you have to join the table and then set the where condition. The other way would give your an error
Was wondering which flavor of SQL that is. The WHERE goes at the end in mssql, mysql, and I think Oracle. Can't speak to any others though.
Each part of the query is executed sequentially and the order is a bit different to how you read the statement. The execution order is as follows:
[1] FROM and JOINs
[2] WHERE
[3] GROUP BY
[4] HAVING
[5] SELECT
[6] DISTINCT
[7] ORDER BY
[8] OFFSET
@@EinKesselBuntes You separate DISTINCT and ORDER BY but I was somewhat certain that DISTINCT relied on a SORT operation to complete to guarantee the uniqueness of the returned set (it's a small nitpick that doesn't really matter).
The thing that does matter, and why I appreciate you grouping FROM and JOINs on the same item, is that just because an item is listed first (like FROM before a JOIN) doesn't guarantee that query processor will start there. It's one of those intermediate lessons you learn after working with it forever that you have little control over the order of operations, and generally the best you can do is nudge it in your intended direction, lol
I am not programmer but a network guy, I really do enjoy your videos
Me: Has been using SQL for years.
Also me: Watches anyway because Jeff's about to blow my mind.
1:50 shouldnt be the where clause after the join :D?
Ya same question..
I primarily use MySQL 8 for everything. Tried lots of time to shift to other db but nothing beats the power of SQL. I might perhaps switch something else in future but in generally, all my production apps are running smoothly on MySQL. With JSON type supported, it becomes even more useful
This alone taught me more than my college Databases class
Awesome as always!
Mark my words
In near future this channel will be on top choices of every Developer in the world.
hello from the future, you were right!
About to do this in school. Thanks for the explanation
I like you videos even before played, and you never disappoint me ❣️
Wow great explanation makes it soooo easy , Thank you !
i learn in this short video, more any other course or tutorial even books. congrats.
Mom: no we already have mysql at home
Mysql at home: Excel
More on Svelte firebase
Sveltekit is looking very cool
@@Fireship it uses Snowpack under the hood, I guess.
What about sapper ? Will it ever be released??
@@codeaperture nope
happy to see svelte enthusiasts... :)
@ 2:02 Primary/Foreign labels should be swapped: `Players.team_id` is the Foreign key and the `Teams.id` is the Primary key
Like without see, it's always a terrific vídeo!
Excellent description, thanks
Thanks, I never knew that Greg Ostertag played for the Jazz
Looking forward to more Database interview topics, please
Thanks for the video,
I'm a business student and I'm primarely interested in marketing. Do you guys think that learning SQL to making analysis on using a data for marketing purposes helps me out?
00:03 SQL is the standard language for relational database systems.
00:23 IBM introduced System R database with standardized syntax in 1986
00:43 Establish relationships between data points
01:02 Structuring data in smallest normal form to eliminate duplication
01:19 SQL syntax contains key parts
01:37 Filter results using the WHERE keyword
01:52 SQL uses join keyword to connect data from different tables
02:09 SQL is a structured query language supported by many databases.
.
Did you ever do the full tutorial? I'm taking Database at my college and your explanation cleared a bunch of things I didn't understand. :)
Great start for beginners. Could you please make a short and detailed video on mongodb?
Thanks, perfect timing
Nice!... lambda loves squirrel sql mounted on a svelte backend that regulates Hugo along transitional database contracts. Tash hags included! .
Yay!
short and on the point thank you
I just learned more about it here than in my one semester class
Full SQL tutorial would amazing 🙏
My homies use Json as database.
On small test projects I even use csv as database and then keep calling string.trim().split('
').map(row => row.trim().split(';').map(cell => cell.trim()));
For POC tests and fake APIs, try json-server.
For real stuff, a real database is the way.
Bruh, im not kidding i started learning sql yesterday and u made the video
good vid, full sql tutorial would be awesome
I'm kind of "new" to SQL (mssql) and right now I have few tables with relations, no problem. But how do I design a table for USER SETTINGS? I mean for example site background (and few others). Where and what values would the table have for logged in users?
Can you do a video of Gemini? The middle ground between Gopher and http
You would not believe how much of a lifesave SQL is during linguistic fieldwork
please, do a full video. It'll be awsome
FULL TUTORIAL IS VERY NICE IDEA
yeah lets go for the full tutorial..
Sql tutorial cant wait!!
Loved this explanation. Plz make full sql video.
#fireship #fireshipio #100secofcode
Great video and tool for drawing diagram
A full SQL tutorial please!
Amazing work 😁.
Loved it! ✌️
Fun video! It would have been nice if you added in that SQL is a descriptive language, so the text you write isn't actually executed. It's translated to an optimized script, which then gets executed.
Its executive code as it technicly same as commands and have procedural features and you can execute in sequance. Lot of classical php cms install by not having information how database is constucted which would be descriptive, but sequance of sql queues which builds the database. What you dezcribe could be said about C or C++ or C#. Also programing languages can addapt sql like features like Linq in C#
Wow, really informative video.
Hey, thanks for the coolest videos for devs. What is the tool you used for graphical representation of the schema?
DrawSQL
Impressive Greg Ostertag reference.
He should stop asking "... If you wanna see", of course we want to, I mean, it's a fireship video. 🔥
Can you plz make a short on : Stored procedure
The most important part was missed: ACID compliance. You can actually trust and rely on the data integrity, unlike most document databases...
i was searching for this dumb comment ngl
this is good for beginners. The hard part is learning how to think in logical terms to get what you want. the last sql statement in the video is wrong. as someone pointed out the where clause is mistakenly placed before the join.
SQL Explained in 100
"100 what? apples? bananas?"
While I generally like those short videos, this one is mostly wrong or lacks important concepts, for a change. Databases are not "based on SQL" they're based on what is called an "engine", and the SQL language is just the API that is used to access it. Tables don't need a key. Keys can span over multiple columns. Accessing data needs to be done through indexes for performance, and indexes can also span to multiple columns. Databases also deal with events and can cascade behaviour to enforces certain integrity contrains. SQL also has capacities for mutation over the scheme of the data, and most of the databases engines can perform those mutations while the database is running other requests in parallel, and those requests will succeed.
I agree, there are some areas for improvement here. Working on a full SQL video and taking your comment into account.
Great explantion❤❤
I think a good SQL sequel would be "Different types of SQL JOINs explained in 100 seconds"
really awesome man
Structured Query Language , SQL or Sequel for short *lol , this made me distracted for the first minute and had to rewatch 😆
Thank you. It helps❤️❤️❤️
No clue what any of this means but sounds interesting, nice video 👍👍
thanks I like clear and short 👍
I feel like a dummy, I have been planning to start learning SQL because it is so important, but I struggle to understand this 2-minute video, and it gets overwhelming! I think I will end up switching careers in the end
Can anybody tell which theme he uses for vs code. It looks so cool and materialistic 🔥
Yeah, please make a complete tutorial on SQL
informative video.. ♥️ from India
which schema designer tool did you use?
For what does i exactly need left join ? Nice video
best explaination ever
Which software are you using for designing SQL databases? That looked really cool!
DrawSQL
MIND BLOWN FOREIGN KEY
I needed this. Hey Jeff I do struggle with modelling the data layer. Especially relationships and joins between them. How can I learn this. Any platform you guys use?..
For me, udemy and building stuff. Theory is good but practice is critical too.
I feel like you got the Primary and Foreign key switched around. `id` is the primary key on `Teams`, referenced by the foreign key named `team_id` in the `Players` table
On 2:00 yes