9 ms·
MySQL for Developers
- aarondf 4y agoHey HN, I made this course :D The course is a bit more than 7 hours long split over 64 videos. I was always frustrated by the lack of intermediate database content, it seemed like it was mostly intro stuff, or straight to DBA level. So I read as many database books as I could, read through the official docs, and made this course specifically for application developers. If yall have any feedback I'd love to hear it. I'll be making updates soon, but not before I take a nice long break from editing video.
- geekodour 4y agoThanks for making this Aaron. content looks so good! just in time for me. Unfortunately getting "Sorry Because of its privacy settings, this video cannot be played here.", unsure what's up.
- aarondf 4y agoUh oh! That shouldn't be the case. Where are you viewing from? And what browser? I might need to change some settings in Vimeo
- geekodour 4y agoAh it's for sure some browser extension, it's playing fine in a FF private window. my bad. Will post back once I figure out what's causing it. Again, thanks for the awesome stuff!
- aarondf 4y agoWhew, that's a relief. Keep me posted if you find out it's on our side.
- geekodour 4y agookay totally on my side: it was uMatrix :) https://github.com/gorhill/uMatrix/wiki/Per-scope-switches#referrer-spoofing https://github.com/gorhill/uMatrix/wiki/Per-scope-switches#r...
- collinmanderson 4y agoYeah Vimeo often requires a referrer header to be sent to prevent embedding the video on other websites.
- SadWebDeveloper 4y agoQuite difficult to review that many hours of video but from the syllabus there are probably some missing pieces, mainly stored procedures and triggers, yes i know MySQL sucks for that particular job and probably you didn't touch them because planetscale probably doesn't support them (not a planetscale dev but this is my wild guess). Also didn't see any topic on choosing the right charset/collation for the right data and why.
- aarondf 4y agoOh there are definitely missing pieces! I tried to cover the "meaty middle" of what application developers usually need to know. I did not cover stored procedures and triggers. I did cover CTEs and windows, which are not yet supported by PlanetScale. I also covered foreign key constraints, which are not yet supported by PlanetScale. As far as charset and collation, I cover that a bit in the "strings" video of the "Schema" section. Let me know if you have any other feedback!
- Aeolun 4y agoBut then, most devs wouldn’t want their procedures inside the database anyway (with attendant lack of integration/versioning).
- mijustin 4y agoThis is well done! I can see that you've done your research: you've synthesized so much of the written material on MySQL (books, docs) in each lesson. Makes learning these concepts really accessible.
- aarondf 4y agoThank you Justin, that was 100% my intent so that's encouraging to hear. There is a ton of good information, but man so much of it is irrelevant for application developers (as opposed to DBAs). Hopefully this fills that gap!
- jordanmoconnor 4y agoNice work! Congrats on shipping it
- ano88888 4y agothis is great. Thank you so much for your effort. Really appreciate it. By the way , if you are starting a startup, will you use mysql or postresql and why assuming you are equally good at both ?
- ndstephens 4y agoThis looks great!! Hopefully you can answer a couple questions for me. You mention you're using TablePlus. Doesn't look like it has a free option. Can you recommend another similar database GUI tool so I can "code along"? And is there a database I can connect to and work with? Maybe you answer these at some point in the course, but I didn't see anything in the intro. Also you mention this is for devs and not DBA's. Do you go over strategies for creating and "maintaining" a new db for a basic app? Or is this for a dev to work against a db that fully created and maintained by a DBA? I'm interested in using PlanetScale for hobby projects, so i'm currently trying to learn about not just using a db, but also being my own DBA (on a very small and basic scale). Thank you for the course and any feedback on my questions.
- saluki 4y agoTable Plus (Free Trial Version) What are the limitations of the free trial? The free trial is limited to 2 opened tabs, 2 opened windows, 2 advanced filters (filters are not available on the free TablePlus Windows) at a time. We can change the limitations without any notifications in the future releases.
- ndstephens 4y agoMaybe i'm reading into their naming incorrectly. Free "trial" to me sounds like it's time based...as in after a week you can no longer use it and must buy. I'll give it a try.
- tough 4y agoIt's not time based, only feature based, if you don't need lots of open tabs you can survive it it's only a bit annoying Beekeeper Studio similarly has a (community edition) and it's GPLv3 licensed
- ndstephens 4y agothanks for the recommendation. will check it out
- asddubs 4y agoSince you call it intermediate level, would you recommend it for people who are already familiar with the basics of MySQL? Would someone who has no problem formulating a query to get any given result from a database and knows the basics of how to create indexes still learn anything new from this?
- aarondf 4y agoYeah, I think you would still learn some good stuff! I go pretty deep into indexes and do some fun stuff with generated columns, windows, and CTEs. Based on your comment, you're the person I was hoping to hit! So if you do watch it, lemme know what you think
- reactordev 4y agoI’ve been using MySQL since 1998. I know the source code very well. I’ve designed large platforms with MySQL but I run postgres in production. I also wrote my own SQL engine. This is very VERY well done. Kudos. I’m loving that we have a contender for mongo atlas with planetscale. Keep this kind of content coming and you’ll be the next snowflake.
- aarondf 4y agoWell that's a massive encouragement. Thank you so much!
- nbosscher 4y agoThis is amazing! I've been following Aaron's short database videos on Twitter and he is the real deal. Accessible, straightforward explanations of complex db stuff. I highly recommend checking this out.
- aarondf 4y agoThanks Nate! Excited to get back to short form videos haha. I'm done with long form for a little bit
- mjwhansen 4y agoAwesome!
- whitepoplar 4y agoCool! Now we need this for Postgres.
- elforce002 4y ago100x this.
- winrid 4y agoTheir product is for MySQL, so I doubt we'll see that soon.
- acomjean 4y agoI’ve been using MySQL. Is Postgres so different now that the SQL here won’t work? (It may be that it’s MYSQL that’s different) I know there are some differences in SQL syntax, but in my case we use pretty basic sql…
- pphysch 4y agoOutside of SQL they are different technologies. MySQL mingles its custom language with SQL which is a common point of confusion... Whom amongst us wasn't confused when "DESCRIBE" didn't work in SQLite or Postgres?
- FinalBriefing 4y agoAre they really different technologies? It has always been my impression that they are the same tech, but they have a slightly different syntax in some places (DESCRIBE) and different levels of capabilities (Postgres offers more). If you know the core concepts of one, you are probably 80% good to go with the other.
- wlll 4y ago> Are they really different technologies? Yes, your impression is wrong.
- deleted 4y ago
- igtztorrero 4y agoSuper Tutorial !!! Thanks
- porker 4y agoDoes anyone know of a similar intro course for Clickhouse?
- tylerhannan 4y agoStarting here is probably useful... https://learn.clickhouse.com/visitor_catalog_class/show/913420/ https://learn.clickhouse.com/visitor_catalog_class/show/9134... But there is quite a bit on learn.clickhouse ;) And if something is missing, tell us.
- JonoBB 4y agoI've just got started with Clickhouse, and their docs are excellent. Quick Start guide and tutorials are very well written. Also, be prepared to be blown away with Clickhouse. I've not seen many (any?) technologies that impressed me this much right out the box.
- nidnogg 4y agoIs this really free? I can't quite put my finger on it but it seems so...high quality? Kudos to Aaron though, will gladly dive in later on
- aarondf 4y agoHaha thank you! I'm really grateful that everyone at PlanetScale gave me _so_ much time to work on this. We're really committed to doing everything as high quality as we can, even the free stuff. Let me know what you think!
- aculver 4y agoYeah, you're not alone. Aaron posted a thread on Twitter that shares the inside skinny on what it took to ship this course (https://twitter.com/aarondfrancis/status/1638191349261377539 https://twitter.com/aarondfrancis/status/1638191349261377539) but I had an early peek into the work he was doing on this course, and there was a clear inflection point in the project when he joined Planetscale and had the benefit of being able to focus a substantial amount of his time on it in addition to all the work other members of the team there were able to contribute to it. Very grateful that Planetscale unlocked this so it's available as a free resource instead of having to be behind a paywall to support its creator.
- MangoCoffee 4y agonice. i use MS SQL at work and MySql for personal project
- tracker1 4y agoMight be worth looking into PostgreSQL as well. It's just as readily containerized (docker) as well as being more ANSI compliant and consistent. I only say this because nearly every time I've ever used MySQL, I find annoyances. Such as the fact that 'utf8' isn't 'utf8', 'utf8mb4' is... the feature was in testing as utf8 was being standardized and mysql used 'utf8mb3', and never updated the reference for 'utf8' for compatibility, even across major versions. There's also the fact that collation on indexes for binary fields are case-insensitive if your default collation is, even if it's "binary". Also, PostgreSQL has nicer support, imo, for JSON (JSONB) data, as well as a rich extension ecosystem.
- mschuster91 4y agoPostgreSQL, however, is one hell of a PITA to upgrade. Keeping a cluster of MySQL machines alive is way easier than PostgreSQL, not to mention how easy it is to shoot yourself in the foot with its authentication mechanisms.
- johannes1234321 4y ago> Also, PostgreSQL has nicer support, imo, for JSON (JSONB) data, as well as a rich extension ecosystem. MySQL's JSON data type, which exists since 5.7, which is quite old, is a solutely comparable to PostgreSQL's JSONB. (But don't be confused by MariaDB, which is a MySQL fork, where JSON is an alias to MEDIUMTEXT or something like that with little snytax validation)
- manv1 4y agoPosgreSQL has its share of annoyances, like case preserving case insensitivity and inconsistent naming of its tools/config files. Nothing like trying to do a select on a table/column that you know is there and getting an error...becuase the table/column was created with quotes by your ORM so it doesn't automagically get case in-sensitized. It's maddening.
- hogya006 4y agoI was always frustrated by the lack of intermediate database content, it seemed like it was mostly intro stuff, or straight to DBA level. So I read as many database books as I could, read through the official docs, and made this course specifically for application developers.
- tracker1 4y agoCan't really comment on the material... but a minor suggestion might be to have a section on ANSI-SQL statements and quotes, and where mySQL/MariaDB breaks the standard (such as foreign key references in table creation). As well as pointing out that you should use 'utf8mb4' for UTF-8, and not 'utf8' encoding.
- mokkol 4y agoWow, that is some awesome quality & quantity. I can't believe this is for free! Well done!
- ingenika 4y agoI don't know why lots of website use dark theme, I just found that dark theme is not very readable during daytime.
- boboroshi 4y agoThis looks amazing. Definitely something I'm going to dive into and level up on my SQL skills.
- michaelbuckbee 4y agoThis is outstanding. I've always felt that one of the big "level ups" that an app developer can do is get a better understanding of how databases work and how/when to leverage their features. The course kind of feels like cheating as it's so much less effort than slogging through all the books and failed projects you'd otherwise need to get the experience.
- ksec 4y agoIt is nice MySQL finally reach the front page on HN. Considering MySQL is extremely unpopular among folks here. I will take this rare opportunity to ask, anyone knows when MySQL 9.0 is coming?
- swyx 4y agothis was both highly anticipated and has been excellently executed. incredible amazing work. thanks Aaron!
- aarondf 4y agoThanks swyx! Means a lot coming from you. We're lucky to have an incredible team at PlanetScale to help me pull off such a huge lift. We had maybe 5 or 6 people building out the website and 5 or 6 people that reviewed the content for technical accuracy. No way I could've done it solo.
- Alifatisk 4y agoThe quality is astonishing, is this really for free?
- paxys 4y agoThe "cost" is that you may consider using Planetscale for your next project/company. So a win-win really.
- benatkin 4y agoTL;DR starting with a list of the data types before querying the data is putting the cart before the horse IMO. It seems a bit like DuoLingo. You learn a random assortment of facts, rather than being exposed to what people are actually doing. I learned MySQL by example and this is far from it. I don't recommend learning about the schema or the data types first, unless you're just being shown a CREATE TABLE statement with just the types you need in order to go through a CRUD example (having you start with a table that already exists and do a SELECT query first is also good). Otherwise, like with DuoLingo, you'll likely get bored, unless the reward mechanism grabs you. (DuoLingo is fully gamified. This has a bunch of short steps so you can watch yourself progress through them.)
- testudovictoria 4y agoThe creator posted this elsewhere in the comments: > it seemed like it was mostly intro stuff, or straight to DBA level This would have been perfect for someone like me a few years ago. I went into my first job knowing how to make simple queries and simple joins. I changed jobs into a legacy system where there was an overwhelming amount of data sharded across few databases and several hundred schemas. I didn't need to learn how to do simple joins or basic keywords like union and intersect that every tutorial talked about. I also didn't need a bunch of DBA knowledge like distribution strategies, replication, and HA techniques. I needed to learn how to leverage what was in the database to pull the exact data I needed more efficiently than what I was doing - windows, cursors, and good subqueries. I was the type of person being addressed.
- realchrissean 4y agoThis is very well done Aaron. I'm curious how long did it take you to create this from start to finish?
- fasteo 4y agoI am also curious
- aarondf 4y agoThank you! I shared a little about the process on twitter here: https://twitter.com/aarondfrancis/status/1638191349261377539 https://twitter.com/aarondfrancis/status/1638191349261377539. Start to finish... a long, long time. 18 months on and off, 4 months full time. I started this before I was employed at PlanetScale and when I joined PS the course came along with me. I wouldn't have had the space to do it if it hadn't been my full time job. For the past four months or so I've been spending 100% of my work time on it, and much of my spare time. Part of what made it tough is that, while I've been comfortable with MySQL for a long time, _teaching_ it is a whole different thing. So I ended up having to study a _ton_. Lots and lots of videos trashed when I got to a point of explaining something and realized I didn't know it well enough to teach. Back to the docs to figure it out myself and then back to recording. I could do it again in about 1/3rd the time, but of course I could! I've done all the hard parts now! The actual recording and editing was of course hard, but the up front work to make sure I wasn't making stuff up was probably the biggest slog of it all.
- chernevik 4y agoI've taught courses on SQL to newbies and learned a lot from it. My rule for the slide deck was "don't use a term you haven't explained". So I'd write a slide and check for new words. If I really needed them I'd have to add a slide before that introduced and explained the term. Figuring out exercises that got students oriented to the concepts was another trick. People really don't get stuff until they've done it for themselves. By the end of the second day I had people writing joins on their own.
- ilrwbwrkhv 4y agoIs there a full chapter by chapter contents?
- crooked-v 4y agoA lot of devs should really be more familiar with plain ol' SQL databases. I've been at multiple companies where people have jumped to elaborate, gigantic, overcomplicated projects preemptively designed to scale to ten billion people, that could have instead been driven entirely by a single big MySQL or Postgres database set up in a day or two instead of a month.
- leros 4y agoI haven't used PlanetScale before but their free tier looks really generous.
- pratikch1253 4y agoThis is perfect I was looking for something like this will definitely be checking it out over this weekend one request please give us the training data set you use for this course so that we can follow along with all the sql queries you are typing.
- aarondf 4y agoThis is a great idea. Let me see how quickly I can get that done.
- KronisLV 4y agoIt's really nice to see more content for MySQL/MariaDB still being made, since it feels like they are still good solutions for a whole variety of situations! While I might look in the direction of PostgreSQL for more advanced in-database processing, for most CRUD apps the aforementioned two are going to be more than enough!
- hu3 4y ago> While I might look in the direction of PostgreSQL for more advanced in-database processing, for most CRUD apps the aforementioned two are going to be more than enough I see this sentiment often here on HN. Something long the lines of "MySQL is enough for small apps but you want PotgreSQL for serious work." When in practice I find the opposite to be true. PotgreSQL is hard to scale and hard to upgrade when compared to MySQL. I mean, just take a look at the caliber of companies that leverage MySQL at scale using Vitess to orchestrate it (spoiler, it powers Youtube, GitHub, Slack, Shopify and more): https://planetscale.com/vitess https://planetscale.com/vitess What's PostgreSQL comparable list?
- mulmen 4y ago> What's PostgreSQL comparable list? Netflix, Instagram, Spotify, Skype, Reddit, Twitch, Yahoo. e: removed Uber.
- samlambert 4y agoYahoo, Uber, Instagram, and Spotify all run on MySQL. https://www.uber.com/en-JP/blog/postgres-to-mysql-migration/ https://www.uber.com/en-JP/blog/postgres-to-mysql-migration/
- pritambarhate 4y agoInstagram definitely runs on PostgreSQL. Here is official Instagram engineering blog mentioning the same: https://instagram-engineering.com/what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad https://instagram-engineering.com/what-powers-instagram-hund... > Most of our data (users, photo metadata, tags, etc) lives in PostgreSQL; we’ve previously written about how we shard across our different Postgres instances Another relatively big company that uses PostgreSQL is Gitlab.
- mayli 4y agoNo foreign keys? Thank you.
- ttfkam 4y agoThis is excellent. My only gripes have nothing to do with the execution of the training, only the terminology co-opted by MySQL. In MySQL, "schema" means the structure of the whole database. In other RDBMSes, "schema" means a namespace within the database. With its cross-database queries, MySQL puts no distinction between a database and a schema. Once again, not a fault of the training here, but a common source of confusion I've run into between MySQL devs and folks working on other systems.
- berkle4455 4y agoIt's far easier if you view it this way: * Schema means the same thing on all RDBMS: a namespace for tables * MySQL doesn't support the notion of multiple databases per server installation
- ttfkam 4y agoThat's a more charitable way of viewing it. Thank you.
- heybrendan 4y agoHi @aarondf, this is bloody phenomenal! Fantastic work. Can we eventually expect something similar for PostgreSQL [for Developers]? And does this course include ORM's, like SQLAlchemy?
- aarondf 4y agoI won't be the one to do PostgreSQL for Developers, but I think _someone_ should! I think a good teacher could make a lot of money doing it if they wanted. This course talks briefly about ORMs, but does not go into usage of any particular one. All raw sql!
- whoiscroberts 4y agoIs this course relevant for MariaDB as well?
- aarondf 4y agoI'd say some of it is, but I don't know enough about Maria to say much more than that. MySQL and Maria have diverged quite a bit at this point, so I'd proceed with caution on any of the specifics.
- Implicated 4y agoAs someone who has been passively watching you develop and promote this course over what feels like _forever_ - I'm SO excited to see the feedback here the way that it is. Kudos to you and the team at Planetscale, Aaron.
- aarondf 4y agoThank you very much. It has certainly been a long journey, and the positive feedback here is a massive relief.
- xavdid 4y agoWow, this looks awesome! I've really been feeling your "lack of intermediate resources" comment recently. I'm comfortable writing basic SQL queries, but wouldn't know how to set up a new DB and don't really know how to build/structure/optimize/manage a database (outside of tools like the Django ORM, which very helpfully abstracts a lot of it). I've been wanting to get more into SQLite as a starting point, since it seems pretty accessible (as opposed to like, running a server). Relatedly, I've got an almost-outgrown-Airtable project that I've been considering moving into my own setup, but the 0-to-1 process is pretty intimidating. Plus, Airtable's schema setup I don't think can be replicated 1:1 in SQL (but I'm not even sure that's true). Anyway, I'm really looking forward to your course. Congrats on the launch, it looks awesome!
- kbumsik 4y agoI really wanted to use Planetscale, but there are two blockers: - No foreign key support - No CTE support I tried using Planetscale knowing that there is no foreign key support because it is fine to me. But I had to stop using Planetscale because of the second. My ORM (ent for golang) relies on CTE so I simply cannot run complicated queries. So if you are considering Planetscale, test it enough especially if you are using an ORM.
- aarondf 4y agoWe do support foreign keys, just not foreign key constraints. There's actually a video in the course that talks about the difference and why you might not need constraints: https://planetscale.com/courses/mysql-for-developers/indexes/foreign-keys https://planetscale.com/courses/mysql-for-developers/indexes.... Correct that we don't yet support CTEs. I'm surprised to hear of an ORM that relies on them! That's pretty cool, never heard of that.
- tbarn 4y agoI'd need to dig into the code, but it looks like someone has used PlanetScale with ent before: https://betterprogramming.pub/how-to-connect-ent-to-planetscale-in-a-go-application-c1337a54d2aa https://betterprogramming.pub/how-to-connect-ent-to-planetsc... Did you follow that blog post already?
- kbumsik 4y agoI just read this post, it looks like a demo for basic operations. When I tried it at the end of the last year, ent works fine with Planetscale for basic reads. However, it fails to read when I use complex queries with Ent GraphQL integration. ent added quite a lot of features last year so things might changed from the time when the blog post was written.